Click here to Skip to main content
16,015,900 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
SqlConnection sc = new SqlConnection(System.Web.Configuration.WebConfigurationManager.ConnectionStrings["hospitalmanagementdb"].ToString());
SqlCommand cmd = new SqlCommand();
cmd.CommandText = "select * from patient where patient_id= " + Request.QueryString["id"].ToString();
cmd.Connection = sc;
sc.Open();
SqlDataReader sdr = cmd.ExecuteReader();
sdr.Read();
sc.Close();

txtFirstnm.Text = sdr[1].ToString();
txtLastnm.Text = sdr[2].ToString();
RadioMF.Text = sdr[3].ToString();
txtAge.Text = sdr[4].ToString();
txtContact.Text = sdr[5].ToString();
txtEmail.Text = sdr[6].ToString();
txtAddress.Text = sdr[7].ToString();
Posted

1 solution

This question is already been answered.
See my answer over here :
data is not fetch in the form[^]

-KR
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900