I am currently using this method to redirect to different folders.
private void btnLogin_Click(object sender, System.EventArgs e)
{
string Role=string.Empty;
if (!string.IsNullOrEmpty(Role = ValidateUser(txtUsername.Text, txtPassword.Text)))
{
If(Role=="Admin")
{
Response.Redirect("Admin/Default.aspx");
}
else if(Role=="Category_A_User")
{
Response.Redirect("Category_A_User/Default.aspx");
}
else if(Role=="Category_B_User")
{
Response.Redirect("Category_B_User/Default.aspx");
}
else if(Role=="Category_C_User")
{
Response.Redirect("Category_C_User/Default.aspx");
}
else if(Role=="Category_D_User")
{
Response.Redirect("Category_D_User/Default.aspx");
}
}
}
I can use sessions, but I want to use the form authentication method to implement it. Can someone please provide me a code example on how to achieve this using forms authentication or tell me the procedure to implement using forms authentication.
thank
source
share