Implementing Observer in ASP.NET
page 4 of 5
by Brian Mains
Feedback
Average Rating: 
Views (Total / Last 10 Days): 11744/ 132

Other Considerations

There are more dynamic ways to create these relationships. For instance, the page could iterate through the child controls, looking for user controls that implement the target interface that is designed for the observer pattern only. This would make it easier to register, but means that every user control will be registered.

In the stateless environment, the observers must be setup on every page load, unless the observer collection is serialized and stored in viewstate.  Each observer object cannot be stored directly in viewstate, but alternatively the collection could store the ID of the control, and retrieve the control again later through the Page.FindControl method. The state of the control can be stored and the observer does not need to be notified every time; however, in real-time systems, where querying the data frequently is a must, this may be desired.


View Entire Article

Article Feedback

Title:  
Name:  
Url: ( Optional )
Comment:  
Please add 2 and 6 and type the answer here:

User Comments

Title: incomplete code   
Name: lokeshsp
Date: 8/7/2008 8:18:04 AM
Comment:
Incomplete code

Product Spotlight
Product Spotlight 
Learn More
.NET Tools
asp.net shopping cart
asp.net chart control






Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2009 ASPAlliance.com  |  Page Processed at 1/8/2009 6:18:49 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search