Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


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

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.

 

 

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