Reputation: 10105
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.
I have got the following findings.
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.
and similarly we can use in Java Script like below.
function RedirecToAnotherPage(){
window.open('abc.aspx?id=10');}
Right?
Here, my query is in which case, I can use the "GET" and "Post" method in real life/dynamic website
Upvotes: 2
Views: 3693
Reputation: 17719
POST
removes constraints that GET
has, like maximum query string size. You can control what data is sent by controlling which fields are inside the form tag. You can have multiple form tags and post the relevant one.
Upvotes: 1
Reputation: 1157
Upvotes: 1
Reputation: 94645
You have to choose GET method especially when you want to read and choose POST
when you want to write/update (database or file etc). Take a look at article - Methods GET and POST in HTML forms - what's the difference?
To learn more on ASP.NET web-app Forms.
Upvotes: 0