Example #1
0
    protected void btlogin_Click(object sender, EventArgs e)
    {
        li.email    = txtuid.Text;
        li.password = txtpass.Text;

        if (Request["PID"] == null && Request["WID"] == null)
        {
            DataSet ds = new DataSet();
            ds = li.get_login_details(li);
            if (ds.Tables[0].Rows.Count != 0)
            {
                Session["uid"] = ds.Tables[0].Rows[0][0].ToString();

                //   string url = "~/sample.aspx?UID = " + Session["uid"];
                //Response.Redirect("M_ZONE/Default.aspx?UID=" + Session["uid"]);
                Response.Redirect("Default.aspx");
            }
            else
            {
                Label1.Visible = true;
                Label1.Text    = "Email or Password is Incorrect, Please try again !!";
            }
            txtuid.Text  = "";
            txtpass.Text = "";
        }
    }