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
 

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

Top