it works... |
| shreya verma replied to Vasanthakumar D at 09-May-08 06:40 |
it works when i did it then stores the value in DB but not picking the the values on page load so for this do tell me,how to write in this for file upload
private void SetValue(string EmpID)
{
string constr = ConfigurationManager.ConnectionStrings["ConStr"].ToString();
SqlConnection con = new SqlConnection(constr);
con.Open();
SqlCommand cmd = new SqlCommand("Usp_SetEmpById", con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue( "@empid", Convert.ToInt32(EmpID));
SqlDataReader sdr = cmd.ExecuteReader();
while (sdr.Read())
{
txtEmpName.Text = sdr[ "EmpName"].ToString();
txtMySiteURL.Text = sdr[ "MySiteURL"].ToString();
txtRO.Text = sdr[ "ReportingOfficer"].ToString();
txtEMail.Text = sdr[ "EMail"].ToString();
}
con.Close();
} |
|