Forms Authentication Redirect URL

G

Guest

I want to be able to programmatically log a user in as a guest and redirect
them to a different page.

Is there any way to do a RedirectFromLoginPage() and explicity specify the
page to which the user will be redirected after the login?

-- p
 
K

Karl Seguin

RedirectFromLoginPage internally makes use of SetAuthCookie and a
Response.Redirect. You can simply make use of those two functions if you
need more granular control.

FormsAuthentication.SetAuthCookie(value, false);
Response.Redirect("whatever.aspx");

Karl
 
Joined
Mar 30, 2012
Messages
1
Reaction score
0
RedirectFromLoginPage internally makes use of SetAuthCookie and a
Response.Redirect. You can simply make use of those two functions if you
need more granular control.

FormsAuthentication.SetAuthCookie(value, false);
Response.Redirect("whatever.aspx");

Karl

--
-->
MY ASP.Net tutorials
http://www.openmymind.net/
http://openmymind.net/redirector.aspx?documentId=51 - Learn about AJAX!
"porko" <[email protected]> wrote in message
news:[email protected]...
>I want to be able to programmatically log a user in as a guest and redirect
> them to a different page.
>
> Is there any way to do a RedirectFromLoginPage() and explicity specify the
> page to which the user will be redirected after the login?
>
> -- p


Thanks. It is working fine for me. It is helpful for me.
 

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,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top