ASP.NET FORM表单提交方式post和get的使用

1."GET" is used to get data from server, as we know , before we want to get some date from server ,we should tell server what  we want,with this mechanism , we ofen  use "GET" to post  few data. There are some limiation when we use "GET": 

      a.    The data in "GET" is encolosed in the "QUERY-STRING " environment variable , and then it is send to server as part  of  the whole URL, so the "GET" data will be unsafely exposed in the browser's URL address zone insecurely.

      b.    The storage space of  "QUERY-STRING" variable is limited, which means that some data will be lost if  the data is too large.

2. "POST" is used to post data to server, the data is contained in the content of HTTP REQUEST whie "GET" transmit it's variables in the head of HTTP REQUEST. With "POST", we can post as much data to server as we want.
 
ps:
   1. If the action address of "GET" is self page, the server will treat it as a new Page, the page's viewsate will be lost. By contraries,if we "POST" the self page, the page's viewsate will still exist.

   2. When we upload some pictures to server, we should use "POST", and the "enctype", a  attribute of the form,  the MIME encode,  must be set as "  ENCTYPE="multipart/form-data" ", while default setting is "ENCTYPE=application/x-www-form-urlencoded", then the input data of form use binary transfers.
 
   3. Instead of "Request.QueryString[]" when we want to get the data of  "GET" , we use "Request.Form[]" to get the data of "POST".

   4. For more infomation about "GET"  and "POST", please see http://www.cs.tut.fi/~jkorpela/forms/methods.html

转载于:https://www.cnblogs.com/tinsuki/archive/2007/02/01/637098.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值