The information in this article applies to:
SUMMARYThe values returned by Request.Form and Request.QueryString are actually objects, rather than strings as you would expect. This causes subtle conversion problems in server-side scripts, especially JScript. MORE INFORMATION
The following call evaluates to TRUE:
This is due to the fact that the Request object returns an IRequestDictionary object rather than a string. In most cases, this subtle fact goes unnoticed because the scripting engine simply substitutes the "Default Value" of the object into scripts as necessary. This is what happens when you assign the requested value to a variable, as shown in the following example:
However, there are some scenarios where this subtlety causes problems. In particular, it may be necessary to perform explicit casts in JScript or when calling automation methods on objects. Another option is to use the .item syntax to extract the default value of the object. The following IsObject call evaluates to FALSE and demonstrates use of the .item syntax.
REFERENCESFor the latest Knowledge Base artices and other support information on Visual InterDev and Active Server Pages, see the following page on the Microsoft Technical Support site: http://support.microsoft.com/support/vinterdev/ Additional query words:
Keywords : kbASP kbASPObj kbScript kbVisID kbVisID100 kbGrpASP kbiis400 kbiis500 |
Last Reviewed: December 8, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |