FormsAuthentication.RedirectFromLoginPage when no ReturnURL

T

tshad

I have a logon page that is may be called by the Forms Authentication setup.

This would put a ReturnURL as part of the URL. I would normally then just
issue a:

FormsAuthentication.RedirectFromLoginPage(logon.txt,true)

But I also am giving them an option to register which would go to a new
page. From this page, when they submit, I want to go the original page they
were heading for (ReturnURL) when the went to the logon page.

What I am doing at the moment is putting the ReturnURL in a session cookie.
When I am done I would just do something like:

server.transfer(session("ReturnURL")).

The problem is that the logon cookie that
FormsAuthentication.RedirectFromLoginPage sets would not be set and when the
user goes to the next page, he would first go to the logon page.

I don't want that to happen. Is there a way to set the cookie the way that
FormsAuthentication.RedirectFromLoginPage does before I do the transfer?

Thanks,

Tom.
 

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

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top