3.1 Page Processing
1. TheWeb application is executed on the server . The browser sends the customer's information to the server. Asp. NET receives this page, it triggers the appropriate server-side event to notify your program code.
2.The Web application is stateless . View state records the state of the customer segment.
3.1.1
HTML form, an HTML page with two text. Fistname=value,lastname=value will be submitted at the time of submission.
String fistname=request.form["Fistname" in ASP
String Fistname=txtfirstname.text can be used in ASP.
NOTE: ASP. NET contains only one <form>,<form> requires runat= "Server" feature
3.1.2 Dynamic User Interface
String message = "<span style\=" color:red\ ">"; Response.Write (message); You can simply set the attribute lblweblcome.forcolor=color.red;
3.1.3 ASP. NET event model
1. Run for the first time. Asp. NET to create page and control objects, initialize the code. Displays HTML to the client. Remove from memory.
2. The user triggers the event, all the form submissions on the page, and the page is reconstructed according to the view.
3.asp.net the status of the last commit according to the submission.
4. Triggering the corresponding event
5. The modified HTML is sent to the client, and the page is removed from memory.
There are new events to repeat 2,4 steps
3.1.4 Auto Loopback
The AutoPostBack property of the Web control is set to true. Asp. NET will automatically generate a JavaScript event.
3.1.5 View state
The Web control EnableViewState property False does not enable view state.
First time request
View state is at risk of being modified, and do not use information from view state as the basis.
2. View state chunking
<configuration>
<system.web>
<pages maxpagestatefieldlength= "1024x768" >
<system.web>
</configuration>
3.1.6 XHMTL Compatibility
1. Label and attribute names must be in lowercase
2. All elements must be closed
3. All elements must be closed
1. Document type definition
The page directive is the document type definition
<! DOCTYPE HTML PUBLIC "-//w3c//dtd XHTML 1.1//en" "Http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" >
2. Configuring XHTML Rendering
<configuration>
<system.web>
<pages controlrenderingcompatibilityversion= "4.0" >
</system.web>
</configuration>
3.1.7 Client ID
ClientIDMode 4 enumeration values autoid link the container and the control ID to produce an ID
The ID of the Static service segment is the ID of the customer segment
Predictable and autoid the same connection, but a little more concise
Inherit use the same policy as the parent container, or read the policy for the configuration file
3.2 Web Forms processing phase
Asp.net.4 Advanced Program 4th edition 3rd Chapter Web Form