1. Four web control types:
HTML controls, HTML server controls, ASP. NET Server controls, user controls, and custom controls.
The ASP. NET controls include:
Form element controls (Textbox, button, label, checkbox ...)
Verify controls
Data Source Control,
Data View Control
Personalized controls
Login controls and security controls
Masterpage
Rich control rich controls.
2.asp.net executionProgramThe mode is the event-driven mode, and the server control is an object that can be used to initiate events.
Asp.net events: event messages are sent to the server through httppost.
General prototype of the event:
Private void eventname (Object sender, eventargs E );
Application and session events; page and control events;
PostBack versus non-PostBack events. The callback event enables the form to be immediately returned to the server.
Ispostback: Indicates whether to load the page when it is loaded for the first time or when it is returned by the client.
3. Use an event handler for multiple controls:
Test the sender implementation
Private void btnclick (Object sender, eventargs E)
{
Button B = sender as button;
String bid = B. ID;
Switch (BID)
{
Case "X": // set the length to three;
Case "Y": // do something.
}
}
The book says it can reduce repetitionCodeTo make the program easy to read and maintain.
4. Properly structured XHTML
Disable all tags, prohibit tag nesting, case-insensitive (Asp.net is not distinguished, C # is distinguished), attribute values are quoted, unique root element <HTML>, keep characters.
5. Asp.net and browsers
Asp.net server controls is processed by the server side and sent to the standard HTML browser.
6. html server controls
To run in ASP. NET, convert the existing HTML page (add the runat attribute)
Practical HTML table for page layout
7. Client Processing
Use the javascipt or vascript script.
<Script language = JavaScript>
Function dosomething ()
{
Document. getelementbyid ("btnsave"). Disabled = false;
}
</SCRIPT>