I want to redirect on the user and admin page based upon role.what code should i write for this
public partial class Login : System.Web.UI.Page
{
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ABCNETConnectionString8"].ConnectionString);
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Loginnewpage_Authenticate(object sender, AuthenticateEventArgs e)
{
if (Membership.ValidateUser(Loginnewpage.UserName, Loginnewpage.Password) == true)
{
Loginnewpage.Visible = true;
Session["user"] = User.Identity.Name;
FormsAuthentication.RedirectFromLoginPage(Loginnewpage.UserName, true);
Response.Redirect("~/Admin/Admin.aspx")
}
else
{
Response.Write("Invalid Login");
}
}
}