Article ID: 296169
Article Last Modified on 8/15/2001
APPLIES TO
- Microsoft Active Server Pages 4.0
This article was previously published under Q296169
SYMPTOMS
When you try to assign a Request.Form or Request.QueryString variable to a Session variable in your JavaScript code, you receive the following error message on a computer that is running Microsoft Windows NT 4.0 (Internet Information Server 4.0):
You receive the following error message on a computer that is running Microsoft Windows 2000 (Internet Information Services 5.0):
CAUSE
The values that Request.Form and Request.QueryString return are actually objects rather than strings. This problem occurs because you cannot store Active Server Pages (ASP) intrinsic objects in Session variables.
RESOLUTION
To resolve this problem, perform the necessary explicit casting by using the .Item property of the Request.Form (or Request.QueryString) object.
For example, the following server-side JavaScript code produces this error:
<% Session("test") = Request.Form("txt"); %>
To correct this code sample, add the .Item property as follows:
<% Session("test") = Request.Form("txt").Item; %>
REFERENCES
For additional information, click the article number below to view the article in the Microsoft Knowledge Base:
173317 INFO: Active Server Pages' Request.Form and Request.QueryString Return Objects
Additional query words: 80004005 0x80004005
Keywords: kbaspobj kbprb KB296169