Well, I'm codding a login function.
I've tried and accessed page "CustomerDetail.aspx" without logging in, then
redirected to page "login.aspx" .But, after authenticated, my code dosen't
work.
string strRedirect = Request["ReturnUrl"];
if(strRedirect == null)
strRedirect = "MyDetail.aspx";
Response.Redirect(strRedirect, true);
the value of "strRedirect" always is null.
How can "Request["ReturnUrl"]" get value?
Rad said:
That is a feature of authentication. When you try and access a page
without logging in, asp.net will redirect you to the login page. The
value in the "ReturnURL" value of the query string will be the page
you original requested
I have readed a example code from MSDN about FormsAuthenticationTicket
calss, but there's a line I can't understand :
'strRedirect = Request["ReturnUrl"];'
What's the mean in which square brackets?
Thank you!
A Chinese student.