Forms Authentication

  • Thread starter Thread starter calvin
  • Start date Start date
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.
 
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
 
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

Back
Top