protected void btn_login_Click(object sender, EventArgs e) { try { tbl_voluntar_BAL objbal = new tbl_voluntar_BAL(); cryptography objcrypt = new cryptography(); string query = "where str_email='" + txt_voluntar_name.Text + "'"; DataSet ds = objbal.getdata(query); if (ds.Tables[0].Rows.Count > 0) { string str = objcrypt.Decrypt(ds.Tables[0].Rows[0]["str_password"].ToString()); if (str.Equals(txt_password.Text)) { Session["vname"] = txt_voluntar_name.Text; Session["vtype"] = "v"; Response.Redirect("inquiry_reply_page.aspx"); } } } catch (Exception ex) { } }
private void bindddlvoluntar() { tbl_voluntar_BAL objbal = new tbl_voluntar_BAL(); DataSet ds = objbal.getdata(""); ddl_voluntar.DataValueField = "int_voluntar_id"; ddl_voluntar.DataTextField = "str_voluntar_name"; ddl_voluntar.DataSource = ds; ddl_voluntar.DataBind(); ddl_voluntar.Items.Insert(0, new ListItem("---select---", "0")); }
public void binddata(string query) { try { tbl_voluntar_BAL objbal = new tbl_voluntar_BAL(); DataSet ds = objbal.getdata(query); gvlist.DataSource = ds; gvlist.DataBind(); } catch (Exception ex) { } }