using System; using System.Collections; using System.Configuration; using System.Data; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Xml.Linq; public partial class login1 : System.Web.UI.Page { Class1 obj = new Class1(); protected void Page_Load(object sender, EventArgs e) { } protected void Button1_Click(object sender, EventArgs e) { DataSet ds = new DataSet(); string qstr = "select * from login where UserName='" + TextBox1.Text + "'and password='" + TextBox2.Text + "'"; obj.FillDs(qstr, ds); if (ds.Tables[0].Rows.Count == 1) { var un = TextBox1.Text; Response.Redirect("welcome.aspx?s="+un+""); } else { Label1.Text = "not valid user"; } } }
Session["User"]=TxtUser.text; Session["ID"]=ID; Response.Redirect("Home.aspx");
if (ds.Tables[0].Rows.Count == 1) { var un = TextBox1.Text; Session["UserName"] = TextBox1.Text; Session["Password"] = TextBox2.Text; Response.Redirect("welcome.aspx?s="+un+""); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)