Beispiel #1
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        if ((username.Value == "") || (password.Value == ""))
        {
        }

        if ((objLogic.UserLogin(username.Value, password.Value)) == true)
        {
            if (Session["Role"].ToString() == "1")
            {
                Response.Redirect("AdminPanel.aspx");
            }
            else
            if (Session["Role"].ToString() == "2")
            {
                Response.Redirect("UserPanel.aspx");
            }
            else
            {
                //پیغام خطا
            }
        }
    }