Question

I need to redirect a user and i am using this JS code

response.Write("<SCRIPT LANGUAGE=""JavaScript"">alert(""You do not have permissions to access this page.""); location.href = 'Session("CurrentPage")' </SCRIPT>")

I am setting the session on each page i visit and in theory this should redirect to the page i was last on, any advice on how i would get this to work?

Was it helpful?

Solution

Session is server side, so you need to do it like this:

response.Write("<SCRIPT LANGUAGE=""JavaScript"">alert(""You do not have permissions to access this page.""); location.href = '" & Session("CurrentPage") & "' </SCRIPT>")
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top