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

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

User Comments

Title: Puedes pasar el codigo   
Name: anonimo
Date: 2011-04-27 9:41:30 PM
proyect? please
Title: incomplete code   
Name: lokeshsp
Date: 2008-08-07 8:18:04 AM
Incomplete code

Product Spotlight
Product Spotlight 

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

©Copyright 1998-2024  |  Page Processed at 2024-07-24 9:15:50 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search