What Is State Management?

   

In the past, you had to jump through some flaming hoops to maintain the identity of a visitor to a web site. You had to use hidden form fields that you passed from page to page, use a unique ID that you passed in the URL, use cookies, or use the ASP Session object. If you've programmed dynamic web applications at all, you know that this was a pain in the posterior!!! I'm not even mentioning simple things like maintaining form field values across page posts, such as you need to do when you perform server-side validation.

To clarify, it would be helpful to identify what state management is and what types you will be faced with when building ASP.NET web applications. State management, or maintaining state, is the process of preserving the condition and information regarding an individual's visit to a single web page, a user's entire visit to your web site, or the condition of your web application as a whole.

According to this definition, state management is used to preserve two things:

  • Condition

  • Information

Maintaining condition can be preserving which value was selected in a drop-down list when a page is posted back to itself for validation. Maintaining information may be assigning a customer ID to a visitor and having that ID follow them throughout their visit to your website.

The definition also states that condition and information are preserved in three different areas:

  • Page state

  • User state

  • Application state

I am going to go into the three different areas and explore some methods that may be familiar to you, but most are pretty new and exciting parts of the .NET Framework.


   
Top


ASP. NET for Web Designers
ASP.NET for Web Designers
ISBN: 073571262X
EAN: 2147483647
Year: 2005
Pages: 94
Authors: Peter Ladka

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net