A
Arpan
In my ASP application, a Session variable takes the following form
<%
Dim strRec,strCol
strRec=Request.QueryString("records")
strCol=Request.QueryString("columns")
Session("RecCol")=strCol & "='" & strRec & "'"
%>
The page has a drop-down list. When a user selects an option from the
drop-down, the page gets submitted to itself automatically. This is how
I have done it:
<select name="rc" onChange="gotoURL(this.form.rc)">
<option value="Try.asp?records=<%= strRec %>&columns=<%= strCol
%>&sess=<%= Session("RecCol") %>Option1</option>
......
......
</select>
& this is the JavaScript code that gets executed when an option is
selected from the drop-down:
<script language="JavaScript">
function gotoURL(objURL){
window.location.href=objURL.options[objURL.selectedIndex].value
}
</script>
Now when an option is selected from the drop-down, the URL becomes
Try.asp?records=rec2&column=col2&sess==''
instead of
Try.asp?records=rec2&column=col2&sess=col1='rec1'
I thought that maybe the equal to sign '=' & the single quotes may be
causing the problem & hence replaced these 2 characters while creating
the Session variable in this way:
Session("RecCol")=strCol & "#}" & strRec & "}"
& later replaced "#" with "=" & "}" with single quotes "'" but that
still didn't solve the problem. The URL now becomes
Try.asp?records=rec2&column=col2&sess=#}}
Any suggestions?
Thanks,
Arpan
<%
Dim strRec,strCol
strRec=Request.QueryString("records")
strCol=Request.QueryString("columns")
Session("RecCol")=strCol & "='" & strRec & "'"
%>
The page has a drop-down list. When a user selects an option from the
drop-down, the page gets submitted to itself automatically. This is how
I have done it:
<select name="rc" onChange="gotoURL(this.form.rc)">
<option value="Try.asp?records=<%= strRec %>&columns=<%= strCol
%>&sess=<%= Session("RecCol") %>Option1</option>
......
......
</select>
& this is the JavaScript code that gets executed when an option is
selected from the drop-down:
<script language="JavaScript">
function gotoURL(objURL){
window.location.href=objURL.options[objURL.selectedIndex].value
}
</script>
Now when an option is selected from the drop-down, the URL becomes
Try.asp?records=rec2&column=col2&sess==''
instead of
Try.asp?records=rec2&column=col2&sess=col1='rec1'
I thought that maybe the equal to sign '=' & the single quotes may be
causing the problem & hence replaced these 2 characters while creating
the Session variable in this way:
Session("RecCol")=strCol & "#}" & strRec & "}"
& later replaced "#" with "=" & "}" with single quotes "'" but that
still didn't solve the problem. The URL now becomes
Try.asp?records=rec2&column=col2&sess=#}}
Any suggestions?
Thanks,
Arpan