Browse DevX
Sign up for e-mail newsletters from DevX

Tip of the Day
Language: Enterprise
Expertise: All
Jan 20, 2000



Building the Right Environment to Support AI, Machine Learning and Deep Learning

Be Careful When Using Request Object Collections to Read a Form Variable in ASP

You can use the shorthand way to read Request object variables in ASP, like this:

sVariable = Request("txtVariable")

However, you must be careful when using it this way. The Request object has many collections, such as the QueryString collection, the Form collection, and Cookies collection. Therefore, when you use this shorthand to read a collection, it will read the QueryString collection first, then the Forms collection, and finally the Cookies collection. So you might retrieve the value of txtVariable from either the QueryString collection or Forms collection, while actually expecting it from the Cookies collection.

Jai Bardhan
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date