Currently, I am attempting to assign a JavaScript value through ASP.
foo('RequestMode', '<%=Request.Querystring("Mode")%>')
My goal is to achieve something along the lines of:
foo('RequestMode', '<%=if (Request.Querystring("Mode")="") then
Session("RequestMode")=""
else
Request.Querystring("Mode")
end if%>')
Whenever I attempt to use the opening tag
<%=
I encounter an error stating
'If' operator requires either two or three operands.
On the contrary, if I opt for the opening tag
<&
A different error appears:
Property access must assign to the property or use its value.
Request.Querystring("Mode") <--- highlighted
This leads me to believe that my code itself isn't flawed. How can I successfully complete my task?