Beispiel #1
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            dml       ob = new dml();
            DataTable dt = new DataTable();

            dt = ob.check(TextBox2.Text, TextBox1.Text);
            if (dt.Rows.Count > 0)
            {
                TextBox1.Text       = "";
                TextBox2.Text       = "";
                Session["username"] = dt.Rows[0]["FIRST_NAME"].ToString();
                Session["userid"]   = dt.Rows[0]["USER_ID"].ToString();
                if (Session["url"] != null)
                {
                    string url = (string)Session["url"];

                    if (url == "http://localhost:52193/WebForm7.aspx")
                    {
                        Response.Redirect("WebForm2.aspx");
                    }
                    else if (Session["adpost"] != null)
                    {
                        Response.Redirect("AdPosting.aspx");
                    }
                    else
                    {
                        Response.Redirect(url);
                    }
                }
            }
            else
            {
            }
            TextBox1.Text = "";
            TextBox2.Text = "";
        }