protected void Submitbtn_Click(object sender, EventArgs e) { string connection_string = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\HILProject\project4\App_Data\adminlog.mdb"; using (OleDbConnection cn = new OleDbConnection(connection_string)) { cn.Open(); String str = "select * from BasicDtl_tbl where UserName=" + usertxt.Text + ""; OleDbCommand cmd = new OleDbCommand(str,cn); // cmd.Connection = cn; OleDbDataAdapter ad = new OleDbDataAdapter(cmd); System.Data.DataSet ds = new System.Data.DataSet(); ad.Fill(ds); Nattxt.Text = ds.Tables[0].Rows[0].ItemArray[2].ToString(); apldposttxt.Text = ds.Tables[0].Rows[0].ItemArray[3].ToString(); cn.Close(); } }
String str = "select * from BasicDtl_tbl where UserName='" + usertxt.Text + "'";
runat="server"
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)