GET和POST VS查询字符串 [英] Get and Post vs Query String
问题描述
当我们从一个页面重定向到另一个页面,可以用来查询字符串。现在,当我用GET和POST的形式标记方法。
Whenever we redirect from one page to another page, Query string can be used. Now when i used the "GET" and "POST" methods in the form tag.
我有以下结果。
- 获取 - 暴露在URL密码字段的数据。因此它不应该被使用。对吗?
- POST - 一些不必要的数据可以从请求访问.FORM它不需要文本字段 。
我想,而导航到另一个页面,我可以clikcing按钮像下面使用的查询字符串。
I think, while navigating to another page, I can use Query String on clikcing the button like below.
Response.Redirect("abc.aspx?id=10") //This will be at the code behind level.
和同样,我们可以在Java脚本使用如下。
and similarly we can use in Java Script like below.
function RedirecToAnotherPage(){
window.open('abc.aspx?id=10');}
右键?
在这里,我的查询是在这种情况下,我可以在现实生活中使用GET和邮报的方法/动态网站
Here, my query is in which case, I can use the "GET" and "Post" method in real life/dynamic website
推荐答案
POST移除GET也像最大的查询字符串大小限制。您可以控制哪些数据是通过控制哪些字段insid埃特表单标签发送。你可以有多个表单标签,并张贴相关的。
POST removes constraints that GET has, like maximum query string size. You can control what data is sent by controlling which fields are insid ethe form tag. You can have multiple form tags and post the relevant one.
这篇关于GET和POST VS查询字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!