• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

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

原作者: [db:作者] 来自: [db:来源] 收藏 邀请
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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
ASP.NET验证控件与客户端脚本的一点小冲突发布时间:2022-07-10
下一篇:
关于X64位系统IIS7下支持32位asp.net程序发布时间:2022-07-10
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap