Distinguishing the Get method from the ASP.net and post method _ Practical skills

Source: Internet
Author: User

In web design, whether dynamic or static, get method is the default, it is limited in the URL address length, so get request method can transmit data is also limited, the general gets method can pass 256 bytes of data, when the request method passed data length is not satisfied with the demand, You need another request method. The maximum value of the data to be passed by the Post,post method is 2mb correspondingly, the form method is required to read the data passed by the Post method. The Post method does not see the parameter data that is passed when the ASPX page executes, More conducive to the security of the page, so generally use the Post method to transfer page data.

Here's a simple example:

Get method

HTML page:

 
 

Send a GET request

 
 

corresponding ASPX page:

 
 

Receive the content from the Get method:

 
 

Post method

HTML page:

 
 

Send POST request

 
 

Enter what to send:

<input type =text name= "Content1"/> <br/> <input 
type =submit value = "Send"/> 
gt; 
</center> 
</body> 
 
 

corresponding ASPX page:

 
 

Receive the contents of the Post method:

 
 

With the Get method, when the ASPX page is executed, the address bar appears with a character "? content1=html input Value ", but the post method, not shown, in contrast, the Post method is relatively safe to apply.

The above is the entire content of this article, we should have a get method and post method of the difference between the understanding of it, I hope this article for everyone's learning help.

Related Article

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.