hello,
I have written below code for retreiving the values from database into the textboxes only when I enter id into the textbox.
but it doesn't show any values ino the textboxes.
please tell how it will be done.
da = new SqlDataAdapter("select * from customers where customerid=" + '" + txtcustid.Text + "' ,conn);
DataSet ds = new DataSet();
da.Fill(ds,"customers");
for(s=0;s<ds.Tables[0].Rows.Count ;s++)
{
if( txtcustid.Text== ds.Tables[0].Rows[s]["customerid"].ToString() )
{
txtcustid.Text =ds.Tables[0].Rows[s] ["customerid"].ToString();
Txtcustname .Text =ds.Tables[0].Rows[s]["contactname"].ToString();
Txtdept.Text= ds.Tables[0].Rows[s]["organisation"].ToString();
}
break;
}