Chapter 11. Optimizing Forms
In a classic ASP.NET website, when you send user input to the server via a form, the existing page in the browser is replaced ("refreshed") by a new page sent by the browser. However, that new page is often almost the same as the existing page. This means, there is scope to cut down the number of bytes sent to the browser to only that content which is new. Also, when the existing page is replaced by the new page, the state of the controls on the existing page is lost, necessitating the introduction of ViewState. This is a problem, especially with GridView
controls, which can generate a lot of ViewState overhead.
You can dramatically improve form responsiveness by:
Reducing the number of trips to the server
Speeding up those trips that are unavoidable by reducing the number of bytes going over the wire
This chapter takes you through three ways to do that:
Client-side validation: We'll look at two options: ASP.NET validation controls and a JavaScript library called...