ASP. NET General processing program

Source: Internet
Author: User


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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.