Hi Karthick,
You need to use SqlDataReader Object to read the data from database. And also you can assign the value of your table to a control using reader object.
See the link:
Retrieving Data Using the DataReader[
^].
Try this:
SqlConnection con = new SqlConnection("YourConnectionStringHere");
con.Open();
SqlCommand cmd = new SqlCommand("SELECT * FROM Table1", con);
SqlDataReader sdr = cmd.ExecuteReader();
while(sdr.Read())
{
TextBox1.Text = Convert.ToString(sdr["FirstName"]);
TextBox2.Text = Convert.ToString(sdr["LastName"]);
}
sdr.Dispose();
cmd.Dispose();
con.Close();
--Amit