ASP. NET Pass Parameter
Get
1 by manually modifying the path inside the URL
2 Passing parameters through hyperlinks
<a href= ". Ashx?id=2&name=bya" > Passing parameters via Hyperlinks </a>
3 passing parameters via browser-side JS code
<input type= "button" value= "Passing parameters via JS code" > Onclick=go ()/>
4 Pass parameters through a GET Request for Form form (Form form submission parameter cannot be placed directly after the URL)
The label to be submitted must have the Name property
All labels must be placed within the form tag
Must have a submit button
Post Pass parameter mode
The feature is to put the request in the newspaper style;
1 Submit parameters via form form
Due to the request characteristics of post and get, all
Get: Query, delete
Post: Add, modify
Logging on security, so it's a special case. Post mode
Get the Pass value method
Context.request.HttpMethod;
Get parameter Accepted
Context.request.querystring[key];
Post parameter Acceptance
Context.request.form[key];
Get the physical path where the site resides
Context.server.MapPath ();
ASP. NET General processing program