Microsoft KB Archive/315782

= QueryStrings: Content Management Server 2001 Overwrites the Value If the Variables Do Not Have Distinct Names =

Article ID: 315782

Article Last Modified on 2/22/2007

-

APPLIES TO


 * Microsoft Content Management Server 2001 Enterprise Edition

-



This article was previously published under Q315782



SYMPTOMS
Users cannot retrieve QueryString items from the collection when all of the variables have the same name.

For example, if you pass the following QueryString to page http:///page1.asp?d=1&d=2&d=3 and then you access the value of variable &quot;d&quot; by using the following QueryString collection item e.g. Request.QueryString(&quot;d&quot;) the result is &quot;1,2,3&quot;. This is the result when you use this code on a static ASP page; however, if you use the same code in a Content Management Server template, you only get the last item in the collection.



CAUSE
When a Content Management Server template stores the QueryString of &quot;d&quot;, it stores it as a string and value pair. It overwrites the value if the string &quot;d&quot; already exists; therefore, &quot;d&quot; returns &quot;3&quot;.



WORKAROUND
To work around this issue, use the following code to parse out the whole QueryString to get &quot;page1.asp?a=1&a=2&a=3&quot;: <% =Request.Querystring(&quot;NROriginalURL&quot;)%>

Keywords: kbnofix kbprb KB315782

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.