Exchanging Data with the Web Visitor

Unlike most older technologies for processing Web forms, ASP.NET normally preserves the value of all server controls from one submission to the next. In other words, once your code or the Web visitor enters a value into some control, that value persists through any number of form submissions (unless, of course, your code or the Web visitor explicitly changes it). If you don’t want the value of a particular control to persist, select it in Web Forms Designer and set its EnableViewState property to False.

The property that gets or sets the displayed value of an HTML or Web server control varies with the type of control. Table 12-3 lists some examples:

Table 12-3. Content Properties of Representative Server Controls ...

Get Faster Smarter Beginning Programming 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.