protected void b2_Click1(object sender, EventArgs e)
    {
        Class1 x = new Class1();

        x.connect();
        string q = "select * from AdminMaster where username='******' and password='******'";
        DataTable dt = x.find(q);

        if (dt.Rows.Count == 0)
        {

        }
        else
        {
            Response.Redirect("../../adminhome.aspx");
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        string username = Request.Form["login"].ToString();
        string password = Request.Form["password"].ToString();

        Class1 x = new Class1();
        x.connect();
        string q = "select * from adminmaster where username='******' and password='******'";

        DataTable dt = x.find(q);

        if (dt.Rows.Count == 0)
        {

            Response.Redirect("admin_login.html");
        }
        else
        {
            Session["Id_admin"] = dt.Rows[0][0].ToString();
            Session["Name"] = dt.Rows[0][1].ToString();
            Response.Redirect("../admin/adminhome.aspx");
        }
    }
    protected void b2_Click(object sender, EventArgs e)
    {
        Class1 x = new Class1();

        x.connect();
        string varusername = txtuser.Text;
        string varpassword = txtpwd.Text;

        string q = "select * from Institutemaster where Email='" + varusername + "' and password='******'";

        DataTable dt = x.find(q);

        if (dt.Rows.Count == 0)
        {

        }
        else
        {
            Response.Redirect("../../institutehome.aspx");

            Session["username"] = varusername;

        }
    }