views:

539

answers:

4

Hopefully the answer is no, but are there any problems with using Request.Params instead of Request.QueryString for retrieving data in the query string in asp.net?

+1  A: 

Not a gotcha as such, but just be aware that request.querystring is much lighter - request.params returns cookies, form variables, server variables and the querystring whereas request.querystring of course just returns the querystring value.

Bayard Randel
A: 

Already answered in http://stackoverflow.com/questions/5706/when-do-request-params-and-request-form-differ

It talks about request.form but it is the same for request.querystring

backslash17
this is not the same question, the OP is asking about tricks to be aware
TStamper
+2  A: 

No, unless you happen to have Forms collection fields with the same field name as an argument name in the Query collection -- then you will get an array when you only expected a single key/value pair.

Alan McBee
A: 

No gotchas. Request.Params is just a bit more full featured.

Now, if you were serializing and saving it to the database, it would be wasteful of bytes, but thats about it.

Serapth