2014-04-04 20 views
0

我需要將用戶重定向和我使用這個js代碼如何將用戶重定向到會話中設置的頁面?

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

我設置這應該重定向到頁面,我是最後一個上的每一頁我訪問上和理論上的會議,就如何任何意見我會得到這個工作?

+0

在服務器端,whih語言使用的是? PHP的? – Birlla

+0

我正在使用ASP @Birlla –

回答

2

Session是服務器端,所以你需要做的是這樣的:

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

啊!顯然這是現在工作,感謝您的幫助:) –

相關問題