7.8. Web State Management

A Web Forms page is re-created from scratch with each server round-trip. Information associated with the page's view states is saved automatically and restored during the page's load phase. This includes the state of the page and its current properties, as well as the state and base properties of the controls of the page. For example, the Text properties of controls, the Checked property of boxes and radio buttons, the Items object associated with a data list, and so on, are maintained across round-trips without our having to do anything. Values not associated with controls, however, are lost between round-trips, unless we explicitly preserve them. Let's look at an example that both illustrates Web state management and ...

Get C# Primer: A Practical Approach now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.