using (SqlConnection conn = new SqlConnection(conStr)) { // Creating insert statement string sql = string.Format(@"SELECT * FROM clientInfo where cl_id = " + txtUID.Text); SqlCommand cmd = new SqlCommand(); cmd.Connection = conn; cmd.CommandText = sql; SqlDataReader dr = null; cmd.CommandType = CommandType.Text; conn.Open(); dr = cmd.ExecuteReader(); if (dr.Read()) { txtFName.Text = (dr["cl_name"].ToString()); txtUNic.Text = (dr["cl_cnic"].ToString()); txtUDob.Text = (dr["cl_dob"].ToString()); txtECMNumber.Text = (dr["cl_rcphone"].ToString()); } conn.Close(); }
txtUDob.Text = (dr["cl_dob"].ToString());
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)