WebForm Development Method
XML-Extensible Markup Language
HTML-Hypertext Markup Language
Run:
Click on the Start button-Benefits: Can card breakpoint
Cons: Very slow start-up
Right-click on HTML, view in browser-benefits: Start very fast
Cons: Unable to snap breakpoints
table cell element
A total of 12
Divided into three major categories
Text Class
<input type= "Text"/>-text box
<input type= "password"/>-Password box
<input type= "hidden"/>-hidden fields
<textarea></textarea>-Text fields
Button Class
<input type= "button"/>-normal button
<input type= "Submit"/>-submit button
<input type= "reset"/>-reset button
<input type= "image"/>-Picture button
Select Class
<input type= "Radio"/>-Radio Box
<input type= "checkbox"/>-check box
<select>-drop-down marquee
<option></option>
<option></option>
</select>
<input type= "File"/>-Select Path
Event delegate notation
In the Page_Load event, enter:
Button1.Click + = button1_click;//Add button Double-click the TAB key to generate a Button1 click event
1 protected void Page_Load (object sender, EventArgs e)2 {3 Button1.Click + = button1_click; 4 }56 void button1_click (object sender, EventArgs e)7 {8 9 }
HTTP stateless
Each time the page submission caused by the refresh, or is an artificial refresh, will be the original page off, even if two pages are the same, they are not the same page
IsPostBack is a property of type bool for the page class that determines whether the request for the current page is the first or not the first time, Ispostback=false is the first request, and when Ispostback=true, represents the first request. Because
The Page_Load is executed for the first request, and Page_Load is executed when the request is not the first time.
protected voidPage_Load (Objectsender, EventArgs e) { if(IsPostBack = =false)//occurs when the page is first requested{TextBox1.Text="123456"; } Button1.Click+ = button1_click;//Event Delegate } voidButton1_Click (Objectsender, EventArgs e) {Label1.Text=TextBox1.Text; }
Three-layer structure
Interface layer: Html, CSS, Js
Business Logic Layer: C #
Data access layer: ADO SQL Server
WebForms Development Foundation