cmd = new SqlCommand("select * from Images where id=" + DropDownList1.SelectedValue + "",con); dr = cmd.ExecuteReader(); while(dr.Read ()) { TextBox1.Text = dr[1].ToString(); }
TextBox1.Text += dr[1].ToString();
SqlDataAdaptor adp=new SqlDataAdaptor("select * from Images where id=" + DropDownList1.SelectedValue + "",Con); Dataset ds=new Dataset(); adp.Fill(ds); for(int i=0;i<ds.tables[0].Rows.Count;i++) { TextBox1.text=ds.Tables[0].Rows[i]["FieldName"]; /* Here u use your own field I store it in TextBox. for your understand. */ }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)