How to keep RETURNURL in the URL if incorrect password?

  • Thread starter Thread starter Randall Parker
  • Start date Start date
R

Randall Parker

I'm coding up C# CodeBehind source code for a Logon.aspx file. I have a newbie few
questions:

1) If a PostBack comes in and you return from it (rather than redirect) then will the
original arguments in the URL (e.g. RETURNURL) stay there? Or does one have to put
those arguments back in the URL?

2) Does RETURNURL return the same thing as FormsAuthentication.RedirectFromLoginPage
will take you to?
ReturnURL = Request.QueryString["RETURNURL"];
Response.Redirect(ReturnURL);
versus:
FormsAuthentication.RedirectFromLoginPage(UserName.Text, Remember.Checked);

Are they equivalent?
 
After a postback the url parameters are present as they were before.

Use reflector to look at - but as far as I can remember they are equal.
 
Back
Top