472,136 Members | 1,516 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,136 software developers and data experts.

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
2 4080
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
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.