How to nav. to a specific page after login page,not default.aspx

G

Guest

I have this working somewhat but need to figure out how to do the following, using Forms authentication mode
I have
start pag
link1--goes to another pag
link2--goes to login page-goes to default.aspx if username and password is in the web.config fil
need to ad
link3--goes to login page-then goes to another page, not default.aspx if username and password is in list and some other criteria
Not sure how it knows what page to go to after passing the login criteria as this is the code I am using
'if found, display the apps start pag
FormsAuthentication.RedirectFromLoginPage(txtUserName.Text, True
Thanks.
 
S

Steve C. Orr [MVP, MCSD]

You don't need to use RedirectFromLoginPage if you don't want.
Instead you can use SetAuthCookie and then do a regular Response.Redirect to
wherever you'd like.
Here's more information:
http://www.aspalliance.com/aspxtreme/sys/Web/Security/FormsAuthenticationClassSetAuthCookie.aspx

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net



Paul said:
I have this working somewhat but need to figure out how to do the
following, using Forms authentication mode.
I have
start page
link1--goes to another page
link2--goes to login page-goes to default.aspx if username and password is in the web.config file
need to add
link3--goes to login page-then goes to another page, not default.aspx if
username and password is in list and some other criteria.
Not sure how it knows what page to go to after passing the login criteria
as this is the code I am using.
 
G

Guest

Ok thanks for the quick response. I will take a look at the link as I have not used SetAuthCookie before.
 

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