December 2001
Intermediate to advanced
360 pages
9h 6m
English
You might have noticed some code in the DataTest1_Load event handler. That code was
If Not IsPostback Then ' Evals true first time browser hits the page
The IsPostback check is used to determine whether the user has called this form before. Think about the stateless nature of HTTP: Any time someone calls a form, it looks like a brand-new user to the Web server. ASP.NET, however, writes some ViewState information into the page when it is rendered and sent to the client. That way, when the client submits the page back to the server, ASP.NET can see that the page has been sent back to the user before. Therefore, the code inside this If statement runs only once for each user who requests this page. This can be important. ...