Asp.net
First, the ASP. NET page requires the framework class library of. Net framewrok and the runtime of the common language. ,
ASP. net, JSP, PHP, ASP, (ASP and ASP. the difference between net is that 1. different Development languages 2. different Operating Mechanisms 3. different Development Methods)
ASP. net advantages: 1. the generated code has nothing to do with the browser (following W3C standards) 2. easy to debug 3. after compilation, execute 4. post-code, (most importantly, it is advantageous for reading and maintaining. CS files to improve page security, which can be developed by different developers <front-end, back-end> and ,).
ASP. net Running Mechanism (IIS server), their. CS and. aspx: they are all local classes. The two are compiled into a class. When the first request is made to the ASPX page, he will find the class. class corresponding to CS, if it does not exist. Regenerate a page class. In C: \ window \ Microsoft \ the second operation does not require compilation .....
The trace attribute of the page is false by default (usually true by default ), page data transmission is the simplest form of page transmission. The mechanism of ispoatback is to save the current value according to <inpout type = "heidden" viewstate> you do not want to see the maintenance view status during the rotation process. enableviewstate = "false ";
A page can have only one page command. ,
When requesting the. ASPX page, one time after the initialization page, loading page, Server Control Verification, control event, page display, page display, several stages ,,,
Page access control. ,,
Use cookies to save the number of user logins. . . . The Session object is used to store the user's login information, and sessionid in the cookie. You can use tags in Web. config.
<System. Web>
<Sessionstate timeout = "20" cookieless = "true" mode = "inproc"> </sessionstate>
<Syetem. Web>
Set the storage location and method. Which accounts for server resources,
Application of grobal. asax to count Website access
Void application_start (Object sender, eventargs E)
{
// Code that runs when the application starts
}
Void application_end (Object sender, eventargs E)
{
// Code that runs when the application is closed
}
Void application_error (Object sender, eventargs E)
{
// Code that runs when an unhandled error occurs
}
Void session_start (Object sender, eventargs E)
{
// The code that runs when the new session starts
}
Void session_end (Object sender, eventargs E)
{
// The code that runs when the session ends.
// Note: Only the sessionstate mode in the web. config file is set
// The session_end event is triggered only when inproc is used. If the session Mode
// If it is set to StateServer or sqlserver, this event is not triggered.
}
The page object is an instance of the page class. The page class inherits system. Web, UI, page;
Request Processing client requests, response corresponding client processing results,
The cookie is stored on the client, with poor security, limited strings, and limited storage size (generally no more than 4 kb). Each Cookie has its own term,
Sessions are stored on the server, with high security, any type, and a default duration of 20 minutes.
The globle. asax file is the global event base ,,,,
Form and data verification ,,
Controls are classified into HTML controls and Web controls ,,.
The HTML control is in JSP. Those <input> are HTML controls.
Web controls are divided into HTML server controls, web server controls (the difference with HTML Service controls is that they start with ASP)
<User control> (learn more later. )
<Custom control>
What are the differences between HTML controls and Web controls?
(1) HTML controls run on the client, web on the server,
(2) Web controls have a public turn. Use status to save the status ,,
(3) HTML events are processed by browsers, and Web controls are processed by sending request servers ,,,
(4) compared with HTML. Web provides richer object models ,,,
Differences between data source controls and data binding controls ,,
The data source control cannot display data (............ Source), the bound control can only display the display data (gradview ),,,
Gradview is a conforming control with seven types of binding columns ,,,
There are two Data Writing Methods: eval (read-only method) and bind (read/write,), which are generally used together with the Textbox Control ,,
Column attribute dataformatstring =
"{0: yy-mm-dd}" <the content is currency>
"{0: n}" <displays numbers>
"{0: c}" <displays currency>