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?
Asked
Active
Viewed 1,421 times
4 Answers
2
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
- 4,202
- 3
- 33
- 38
1
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
- 9,930
- 3
- 42
- 46
0
Already answered in When do Request.Params and Request.Form differ?
It talks about request.form but it is the same for request.querystring

Community
- 1
- 1

backslash17
- 5,300
- 4
- 31
- 46
-
this is not the same question, the OP is asking about tricks to be aware – TStamper May 08 '09 at 01:53
0
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
- 7,122
- 4
- 31
- 39