ASP.NET(1)

1, IIS installation, first install VS rearm IIS, handler mapping problem, use VS comes with the console input commands, registration path

2, the development model, the general treatment procedure, the IO read operation html document, that the front end of the separator

3, post requests and get requests
(1) If the form is GET method to send data to the server data, then the user will be entered in a form on the address bar of your browser sends to the server.
Values ​​form element name attribute = value & attribute form element pwd = user input entered by the user
Accept data files in AddUSerRequest.ashx
string txtUser = context.Request.QueryString["txtUser"];
string txtPwd = context.Request.QueryString["txtPwd"];
(2) If the submitted data to POST, then all data in the form of the request body on the request packet, the format
string txtUser = context.Request.Form["txtUser"];
string txtPwd = context.Request.Form["txtPwd"];
(3) in the end use when submitting the form post or get
General use post
post submission than get security
post to send data than get large (file)
Search (get): to improve the user experience, user-friendly copy the address bar
 
(4) In addition to the form of the method into a get or post, if there are other ways, it represents a get or post request?
Enter directly in the browser address bar, get request.
Click on a hyperlink is a request to the server to send get
 
Only post form method was changed to post this kind of request.
(5)
Stateless HTTP protocol, the second request can not obtain a processing result of the first request. (Subsequent requests can not be obtained before the calculation result of the request)
 
Note: When the form is submitted, the value of value only submit the form element, div, span tags can not be submitted

 

Guess you like

Origin www.cnblogs.com/birdGe/p/11412863.html