Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Interaction between Master Page content items 1

Status
Not open for further replies.

bitseeker

Programmer
Nov 27, 2005
60
US
What is the general event and processing pathway by which a click in one content item in a master page causes another content item to update a field, refresh, modify appearance or be entirely replaced?

I can see generally (in my ASP newbie-ness) how the click in one content item will launch server side routines to process data and prepare the new content for the second content item.

==> The gap in my understanding of this circuit is how the server side code then initiates a refresh, change or whatever to the second-content item. (I think I'm stuck thinking that the content items ("sub-forms") are each separate pages, that can't be force-refreshed from the server side.)

Any guidance in this area would be appreciated.

Thanks!
 
The only time the appearance of the page is refreshed to the end user is when the Response is ended either when there is no more code to be executed or the response is ended explicitly.

Up till then all controls or properties or methods of the master page and those of its contents are 'in scope'. All you need is a way of addressing them. This might require you to create public properties or methods if the standard methods etc don't meet your needs.

This means that you can go round making any changes you like to any of the controls but that the rendering of the control when the response ends uses the final values you have applied only.

Think of the master page plus its contents as a single 'superpage' and you won't go far wrong.



Bob Boffin
 
Thanks for input. That's very helpful. The description of the Response cycle and the "single 'superpage'" idea provide a useful perspective. That tells me I can do what I need to do, and will help me keep oriented while digging out the details.

Any suggestions on links that might provide an overview of of addressing content item controls within master pages?

Thanks!
 
Basically ASP.NET is a "wrapper" for HTML and this is sometimes where people get confused. ASP.NET doesn't really do anything apart from create HTML that is then sent to the client's browser.

If you think of it in three stages it starts to become a bit clearer:

1) Request
When a user goes to a page (or clicks a button that submits a form) this is deemed as a request.

2) Processing
The server needs to process this request and create the relevant HTML. This is the biggest step as far as ASP.NET is concerned and this is where all it's work is done. Using master pages is no different to using a single page; the only difference is that certain parts of the page are used as a template so you don't have to replicate the items that are generic to each of your pages. Once ASP.NET has created the relevant HTML (based on what controls you have on your page, the results of queries etc) it is then ready to send the HTML to the client.

3) Response
The final HTML is sent to the client , the browswer interprets it and displays it to the user.




____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top