Forms Authentication

C

calvin

Hi everyone,

using Forms authentication.

Is there a way to authenticate a user without redirecting them to the
default page.
say i want to redirect an authenticate user to a different page other than
the default page mention
in IIS.

Thanks in advance.
 
G

Guest

Dear Calvin,

You can do that. In your login page where you authenticate the user, you
can specify as follows,

// if the user's login and pwd are maching
{

FormsAuthentication.SetAuthCookie(txtUserName.Text, false);
Response.Redirect("newpage.aspx");

}

where txtUserName is the textbox which you use to get username.

newpage.aspx is your page where you want to redirect the user.

hope it helps
 
S

Scott Allen

Calvin:

Look at FormsAuthentication.RedirectFromLoginPage to get to the page
the user was trying to access before befing forced to login.

HTH,
 

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

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,678
Members
48,796
Latest member
Greg L.

Latest Threads

Top