protected void btnSignIn_Click(object sender, EventArgs e) { string Query = "select * from tbl_Users where Email='" + txtEmail.Value + "' and Password='******'"; if (ConnC.IsExist(Query)) { string UserName = ConnC.GetColumnVal(Query, "UserName"); string UserID = ConnC.GetColumnVal(Query, "ID"); Session["UserName"] = UserName; Session["Email"] = txtEmail.Value; Session["USERID"] = UserID; Response.Redirect("Chat.aspx"); } else { txtEmail.Value = "Invalid Email or Password!!"; } }
public void GetUserImage(string Username) { if (Username != null) { string query = "select Photo from tbl_Users where UserName='******'"; string ImageName = conc.GetColumnVal(query, "Photo"); if (ImageName != "") { UserImage = ImageName; } } }
public void GetUserImage(string Username) { if (Username != null) { string query = "select Photo from Users where Username='******'"; string ImageName = ConnC.GetColumnVal(query, "Photo"); if (ImageName != "") { UserImage = "images/DP/" + ImageName; } } }
protected void btnSignIn_Click(object sender, EventArgs e) { string Query = "select * from tbl_Users where Email='" + txtEmail.Value + "' and Password='******'"; if (ConnC.IsExist(Query)) { string UserName = ConnC.GetColumnVal(Query, "UserName"); Session["UserName"] = UserName; string Badge = ConnC.GetColumnVal(Query, "Badge"); Session["UserBadge"] = Badge; string EnrollNo = ConnC.GetColumnVal(Query, "EnrollNo"); Session["UserEnrollNo"] = EnrollNo; string Department = ConnC.GetColumnVal(Query, "Department"); Session["UserDepartment"] = Department; Session["Pass"] = txtPassword.Value; Session["UserEmail"] = txtEmail.Value; Response.Redirect("NewForm.aspx"); } else { txtEmail.Value = "Invalid Email or Password!!"; } }
protected void btnSignIn_Click(object sender, EventArgs e) { string Query = "select * from Users where Username='******' and Password='******'"; if (ConnC.IsExist(Query)) { string UserName = ConnC.GetColumnVal(Query, "UserName"); Session["UserName"] = UserName; Response.Redirect("Chat.aspx"); } else { //todo error message } }
public void GetUserImage(string Username) { if (Username != null) { string query = "select Photo from tbl_Users where UserName='******'"; string ImageName = ConnC.GetColumnVal(query, "Photo"); if (ImageName != "") { UserImage = ImageName; } else { UserImage = "/images/DP/dummy.png"; } } }
public string GetUserImage(string username) { string RetimgName = "images/dummy.png"; try { string query = "select Photo from tbl_Users where UserName='******'"; string ImageName = ConnC.GetColumnVal(query, "Photo"); if (ImageName != "") { RetimgName = "images/DP/" + ImageName; } } catch (Exception ex) { } return(RetimgName); }