467,138 Members | 1,337 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,138 developers. It's quick & easy.

Forms Authentication Redirect URL

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
Nov 19 '05 #1
  • viewed: 3897
Share:
2 Replies
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" <po***@discussions.microsoft.com> wrote in message
news:EE**********************************@microsof t.com...
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

Nov 19 '05 #2
Yes - That seems to do the trick.

Thanks!

"Karl Seguin" wrote:
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" <po***@discussions.microsoft.com> wrote in message
news:EE**********************************@microsof t.com...
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


Nov 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

11 posts views Thread by ElmoWatson | last post: by
3 posts views Thread by Kris van der Mast | last post: by
3 posts views Thread by Martin | last post: by
5 posts views Thread by Kenneth Keeley | last post: by
reply views Thread by Anonieko Ramos | last post: by
5 posts views Thread by Gavin Stevens | last post: by
1 post views Thread by The Eeediot | last post: by
2 posts views Thread by code | last post: by
2 posts views Thread by Wiktor Zychla [C# MVP] | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.