O'Reilly logo

ASP.NET for Web Designers by Peter Ladka

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required