To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here
VBForums  

VB Wire News
Article :: Building Dynamic Systems with Expressions in .NET
How Is XML Like An Interface?
Understanding Covariance and Contravariance
Print VS 2010 Keyboard Shortcut References in Letter (8.5x11in) and A4 (210×297mm) Sizes
Updated Productivity Power Tools



Go Back   VBForums > .NET > ASP.NET

Reply Post New Thread
 
Thread Tools Display Modes
Old Feb 3rd, 2010, 05:39 PM   #1
joshjoneswas
Junior Member
 
Join Date: Aug 05
Posts: 30
joshjoneswas is an unknown quantity at this point (<10)
Add a TabPanel on a Nested Page from a Master Page

Hello All,

I have just discovered ASP.NET and, with the help of this board, have been making some great leaps in the last month or so with conceptualizing the framework. I come from a windows dev environment so the web makes me feel like a big dummy.

I am using VS2008, VB.NET, 3.5 Framework, ASP.NET, AjaxControlToolkit.

I have included a screen shot that might help to look at while you read my attempt to explain my issue below!

So please bare with me, but I just recently discovered in a book here on my desk how to interact with a master page programmatically from a nested master page or a regular aspx child page. The method they describe makes sense and is familar to me because they use Public Properties on the master page to manipulate the GUI and controls on the master page. But since they are public, the child pages can see them and fire them off. Makes sense.

I thought I could use this method to do the opposite of that and have the master page fire off something (say a public property in a nested page) to have it then do some work and update things on that nested page.

For example,

I have a MASTERPAGE.MASTER. Under that, I have a LEFTNAV.MASTER (so its a nested master page). Then, under that I have my default.aspx page.

(I did that so that for some of my regular aspx pages I could just tie them directly to the master page so that they dont have a left navigation page...like for big charts or graphs, etc. Is that the best way for that by the way?)

So on the masterpage, I have just a simple asp.net search textbox and an asp.net search button. When they type something in and click search, I want it to add a tab to the AJAXControlToolkit - TabPanel that I have on the default.aspx page, then some other things such as update a datagridview there with the search results.

I can do all of this except the event firing and scope. I cannot see a way to make a button on the master page up top fire off an event that is on the default.aspx page to make it do what it needs to do.

What I tried doing was creating a public property on my default.aspx page. I have some actual code in the SET to do some GUI manipulation and change some stuff on the page. But on my master page within the search button's click event, I cannot see where to call this public property on the default.aspx page...

Am I WAYYYYY wrong on this?

Thanks for any feedback.
Attached Images
 
joshjoneswas is offline   Reply With Quote
Old Feb 4th, 2010, 02:16 AM   #2
gep13
ASP.Nut
 
gep13's Avatar
 
Join Date: Nov 04
Location: The Granite City
Posts: 13,728
gep13 is a name known to all (1000+)gep13 is a name known to all (1000+)gep13 is a name known to all (1000+)gep13 is a name known to all (1000+)gep13 is a name known to all (1000+)gep13 is a name known to all (1000+)gep13 is a name known to all (1000+)gep13 is a name known to all (1000+)gep13 is a name known to all (1000+)
Re: Add a TabPanel on a Nested Page from a Master Page

Hey,

In my opinion, the Master Page shouldn't interact with the Content Page as you are describing, there is really no need for this to happen.

Instead, you might want to think about passing parameters into the content page via query string parameters, session parameters etc.

That way, on the load event of the content page, inspect these parameters, and then take the necessary action to create the required tabs.

Does that make sense.

Gary
__________________
Remember to mark your thread as resolved. Check out the new Forum features, including tagging here. Remember to rate posts that help.

My Site - ASP.Net Website running on CentOS 5.3 with Mono
My Blog - Blog on Aberdeen Developers .Net User Group
View my MCP Certifications

Free Stuff: WebsiteSpark|DreamSpark|BizSpark
Learning Resources: MSDN|LearnVisualStudio|TrainingSpot|ScottGu's Blog|ASP.Net Starter Kits|Regex|RegExLib
Useful Tools: XPath Builder|UltraMon|RegExBuddy|CopySourceAsHtml|TracExplorer|SQLyog|Chart Controls for .Net|SharePoint Designer|CodeRush Express
Coding Links: XPath|ConnectionStrings|VB and MySQL|MySQL Connector.Net|My.Settings
ADO.Net: MSDN Reference|Introduction|Using Access|Always use Parameters|Save and Retrieve Data - jm|An Explanation - jm
Code Bank Submissions: Code Snippets|Profile Provider|Serialization: C# VB|Restricted Menu|Compressed HttpWebRequest|Enumerate and Add Internet Explorer Favourites: VB C#|C# Tabbed Web Browser|Enhanced Tabbed Web Browser: VB C#
gep13 is offline   Reply With Quote
Old Feb 4th, 2010, 10:37 AM   #3
joshjoneswas
Junior Member
 
Join Date: Aug 05
Posts: 30
joshjoneswas is an unknown quantity at this point (<10)
Re: Add a TabPanel on a Nested Page from a Master Page

Thanks Gary for chiming in! Long time no see.

Quote:
via query string parameters, session parameters etc.
I guess that part throws me a little bit as I have yet to work with any session state variables, cookies, or anything that passes data around or stores data in the app yet...

[timelapse, fast forward]
OK, so I just went out on the net and have been looking into the Session("") stuff and I cannot believe I did not know about it beforehand. I've got it now sending search paramaters to my default.aspx page from the masterpage.master.

The only thing I don't like too much that I cannot seem to find much on so far is the fact that it refreshes the whole page. Know of a way to have a Redirect target just a <DIV> on a page?

Or, perhaps is there a way in ASP.NET or just HTML to embed an actual .aspx page within smaller target? Or would I have to make what is my default.aspx page (in the pic above) into a masterpage and have a content template within there that just houses the tabs in their own aspx page?

Or, further yet still, would I be able to add a second content template to my LeftNav or MasterPage (in the pic above) to house just the tabs and still have the other content of the page all around that? It seems like I have seen examples where there are more than one content template in master pages... not sure.
joshjoneswas is offline   Reply With Quote
Old Feb 4th, 2010, 10:55 AM   #4
gep13
ASP.Nut
 
gep13's Avatar
 
Join Date: Nov 04
Location: The Granite City
Posts: 13,728
gep13 is a name known to all (1000+)gep13 is a name known to all (1000+)gep13 is a name known to all (1000+)gep13 is a name known to all (1000+)gep13 is a name known to all (1000+)gep13 is a name known to all (1000+)gep13 is a name known to all (1000+)gep13 is a name known to all (1000+)gep13 is a name known to all (1000+)
Re: Add a TabPanel on a Nested Page from a Master Page

Hey,

It sounds like what you might be after is an AJAX UpdatePanel:
http://www.asp.net/Ajax/Documentatio...datePanel.aspx


This does a partial post back to the server, so it won't do a full page refresh.

Gary
__________________
Remember to mark your thread as resolved. Check out the new Forum features, including tagging here. Remember to rate posts that help.

My Site - ASP.Net Website running on CentOS 5.3 with Mono
My Blog - Blog on Aberdeen Developers .Net User Group
View my MCP Certifications

Free Stuff: WebsiteSpark|DreamSpark|BizSpark
Learning Resources: MSDN|LearnVisualStudio|TrainingSpot|ScottGu's Blog|ASP.Net Starter Kits|Regex|RegExLib
Useful Tools: XPath Builder|UltraMon|RegExBuddy|CopySourceAsHtml|TracExplorer|SQLyog|Chart Controls for .Net|SharePoint Designer|CodeRush Express
Coding Links: XPath|ConnectionStrings|VB and MySQL|MySQL Connector.Net|My.Settings
ADO.Net: MSDN Reference|Introduction|Using Access|Always use Parameters|Save and Retrieve Data - jm|An Explanation - jm
Code Bank Submissions: Code Snippets|Profile Provider|Serialization: C# VB|Restricted Menu|Compressed HttpWebRequest|Enumerate and Add Internet Explorer Favourites: VB C#|C# Tabbed Web Browser|Enhanced Tabbed Web Browser: VB C#
gep13 is offline   Reply With Quote
Old Feb 5th, 2010, 07:09 AM   #5
mendhak
ASP.NET Moderator
 
mendhak's Avatar
 
Join Date: Feb 02
Location: Ulaan Baator GooGoo: Frog
Posts: 38,150
mendhak has a brilliant future (2000+)mendhak has a brilliant future (2000+)mendhak has a brilliant future (2000+)mendhak has a brilliant future (2000+)mendhak has a brilliant future (2000+)mendhak has a brilliant future (2000+)mendhak has a brilliant future (2000+)mendhak has a brilliant future (2000+)mendhak has a brilliant future (2000+)mendhak has a brilliant future (2000+)mendhak has a brilliant future (2000+)
Re: Add a TabPanel on a Nested Page from a Master Page

You're going to make it unnecessarily complicated for yourself if you use a session or updatepanel. Part of the problem is that you've got the search box in the master, but the search results in the content page. You therefore shouldn't have an UpdatePanel spanning the button to the tabs, as that would encapsulate too much. A session would involve a postback anyways so you may as well go querystring. Is the postback really such a big deal, keeping in mind that you can't have a web app behave just like a windows form app? It's one of the most common things on the web. I'm about to click 'post quick reply' and it's going to do a post. When you do a search just about anywhere, there's a post/refresh.
mendhak is offline   Reply With Quote
Old Feb 10th, 2010, 08:57 AM   #6
joshjoneswas
Junior Member
 
Join Date: Aug 05
Posts: 30
joshjoneswas is an unknown quantity at this point (<10)
Re: Add a TabPanel on a Nested Page from a Master Page

mendhak, you may be right, I guess, the more I think about it. Perhaps I am just seeing it from a different perspective since I haven't completed it yet.

I just now was able to get back to this project as all the fire drills at work took my time, but I will let you know how it goes when I complete an example that just does a page refresh.

Then, after I get it working, I will tweak it and see how I can optimize everything.

Thanks for the advice, guys!
joshjoneswas is offline   Reply With Quote
Old Feb 10th, 2010, 04:16 PM   #7
mendhak
ASP.NET Moderator
 
mendhak's Avatar
 
Join Date: Feb 02
Location: Ulaan Baator GooGoo: Frog
Posts: 38,150
mendhak has a brilliant future (2000+)mendhak has a brilliant future (2000+)mendhak has a brilliant future (2000+)mendhak has a brilliant future (2000+)mendhak has a brilliant future (2000+)mendhak has a brilliant future (2000+)mendhak has a brilliant future (2000+)mendhak has a brilliant future (2000+)mendhak has a brilliant future (2000+)mendhak has a brilliant future (2000+)mendhak has a brilliant future (2000+)
Re: Add a TabPanel on a Nested Page from a Master Page

Alright, post if you get stuck, we're always happy to help.
mendhak is offline   Reply With Quote
Reply

Tags
asp.net

Go Back   VBForums > .NET > ASP.NET


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 08:06 PM.





Acceptable Use Policy

Internet.com
The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.