I am trying to set a value in javascript via ASP
foo('RequestMode', '<%=Request.Querystring("Mode")%>')
What I'd like to do is something like this
foo('RequestMode', '<%=if (Request.Querystring("Mode")="") then
Session("RequestMode")=""
else
Request.Querystring("Mode")
end if%>')
If I use the opening tag
<%=
I get an error saying
'If' operator requires either two or three operands.
but if I use the opening tag
<&
I get an error saying
Property access must assign to the property or use its value.
Request.Querystring("Mode") <--- highlighted
Which makes me believe that there's no error with my code, per se. How can I accomplish my task?