Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

request.form("") Vs request.querystring("")

Status
Not open for further replies.

Kingkumar

Programmer
Jan 21, 2003
167
0
0
US
Hi,
I know if you use post method in your form submission then you use request.form and if u use get method u use request.querystring

but i was wondering what are the other major differences in the two in terms of performance and if i have 5 controls on the form ( a checkbox, a textbox, a radiobutton, a listbox and a dropdown) can i access all through both the methods or not ?
thanks.

--KingKumar
 
I suppose the rule of thumb that I use, is if you can see all your content in the URL when submitted, you'd use request.querystring() if you don't see it there, then you need to use request.form

_______
I love small animals, especially with a good brown gravy....
 
1. The GET method appends the parameters to the URL and since the URL length is limited, it only works for few parameters.

2. And it is not a good practice to use the GET method if you are passing username and password...because these parameters can be seen in the URL

3. POST method is more secure when compared to GET


-DNG
 
Also using JavaScript Open.window command and passing information in your string will require the request.querystring

_______
I love small animals, especially with a good brown gravy....
 
If you have it in a querystring, a user can save a link to the page and return to it at a later time... long after the session has expired. Users like to do this kind of thing but sometimes it is inconsistant with the way your web application is designed.

Also, if you have it in a querystring, anyone savy enough to look in the browser cache can see what were entered.

So you might want to use POST if security is a concern or, as pkailas mentioned, if you have a long textbox input or somesuch that won't all fit into the querystring.

 
just so you know, you can also reach either with request("whatever")
 
Thanks a lot guys for your input.
just to make sure that i understood correctly
apasrt from url appending( of course the size of querystring) there is no major difference in the two methods

I can access all the controls using either of the methods.
It doesnt matter if i use get method and use request.querystring
or post mehtod and request.form ????

Also is it true that get is faster than post method??
thanks.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top