Page State

As I said before, the web server doesn’t care about user information or condition. If you were creating a form that would post back to itself, it would be your job as a designer to maintain the information a user entered into the form across posts; otherwise, the information the user inserted would be lost when the page was delivered back. The following is a simple example of this in traditional ASP.

Traditional ASP—trad_page_stat.asp
<%@LANGUAGE="VBSCRIPT"%> 
<%dim vFirstName,vLastName,vPhone,vEmail 
vFirstName = "" 
vLastName = "" 
vPhone = "" 
vEmail = "" 

if Request.Form("submit") <> "" then 
    vFirstName = Request.Form("firstname")
						vLastName = Request.Form("lastname")
						vPhone = Request.Form("phone")
						vEmail = Request.Form("email") end ...

Get ASP.NET for Web Designers 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.