How to keep RETURNURL in the URL if incorrect password?

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?
 
D

Daniel Fisher\(lennybacon\)

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top