using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Data.OleDb; public partial class index : System.Web.UI.Page { connection objconn=new connection(); OleDbConnection conn; protected void Page_Load(object sender, EventArgs e) { conn = objconn.getconn(); } protected void imgbtnLogin_Click(object sender, ImageClickEventArgs e) { OleDbCommand cmd=new OleDbCommand("select * from MemberMaster where UserId='"+ txtUserId.Text +"' and password='"+ txtPassword.Text +"'",conn); OleDbDataAdapter dap = new OleDbDataAdapter(cmd); DataTable dt = new DataTable(); int count=dap.Fill(dt); if (count != 0) { Session["UserId"] = txtUserId.Text; Response.Redirect("EditData.aspx"); // Response.Redirect("/anumni/EditData.asp"); //lblRedirect.Text = "/anumni/EditData.asp"; // imgbtnLogin.Attributes.Add("onclick", "location.href=EditData.asp;"); } else { lblError.Visible = true; lblError.Text = "UserName or Password wrong"; } } }