February 16, 2002

Improve performance with the EnableViewState property

All Web Forms controls, and the page itself, expose the EnableViewState property, a boolean that says whether the current value of the control must be saved in the __VIEWSTATE hidden field and restored during a page postback. By default this property is True, which means that a field’s value is

The AutoPostBack property requires client-side scripting

A few Web Forms control expose the AutoPostBack property, which makes it possible to start a postback when the user clicks on these controls or changes their contents. By default this property is False, but you can set it to True for the following controls: TextBox, CheckBox, RadioButton, CheckBoxList, RadioButtonList,

Saving data between postbacks in the ViewState collection

In classic ASP, the only way to preserve information – for example, the value of a variable- – between consecutive client requests is by means of Session variables, cookies, or other awkward techniques, such as arguments on the query string or values in hidden fields. ASP.NET gives you yet another

Better user experience with the SmartNavigation property

During a page postback, the page is redrawn by default and users see a short but annoying flickering. Worse, the scroll position isn’t preserved during postbacks (the page scrolls to its top) and the first control on the page takes the input focus. This behavior contrasts with the experience that