A Quick Look at ASP.NET
Before we look into the technical details of working with ASP.NET, let s consider a typical situation when writing a Web application with ASP. As you are probably aware, HTTP is a stateless protocol. Although being stateless has its benefits, such as reducing the resources on the server side, it often poses headaches for Web developers. The following example illustrates one of the problems with statelessness commonly faced by ASP developers. In this example, you have a form and you need users to fill it in and submit it for processing. The form may look like Figure 3.1.
Figure 3.1: Web Application Using ASP
When you click Submit, you print a message on the same page, as shown in Figure 3.2.
Figure 3.2: State Is Lost When the ASP Page Is Submitted
Notice that the name in the text box is gone and the item in the selection list has been reset to the first item. Figure 3.3 shows the ASP code for the sample Web application.
Tell us about yourself:
Figure 3.3: Eg1.asp
To ensure that the name and selection item remains selected after submission, you must modify the codes as...