What's the prob??

shreya verma posted at 09-May-08 02:48

See, what's the problem out there in my code, it's not working. i tried even it with using breakpoint. while opening the page after login details are not shown on the page

Code

protected void Page_Load(object sender, EventArgs e)

{

string EmpID = (string)Request.QueryString["empid"];

if (!Page.IsPostBack)

{

txtEmpName.ReadOnly = true;

txtMySiteURL.ReadOnly = true;

txtRO.ReadOnly = true;

txtEMail.ReadOnly = true;

FileUpload1.Enabled = false;

btnUpdate2.Enabled = false;

}

SetValue(EmpID);

}

 

private void SetValue(string EmpID)

{

EmpID = (string)Request.QueryString["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();

}

}


Click here to sign in and reply. You could earn money via our $500 contest just for being helpful.
  What's the prob?? - shreya verma  09-May-08 02:48 2:48:58 AM
      Re:Check EmpId - Sunil Lakshkar  09-May-08 02:58 2:58:55 AM
          See.... - shreya verma  09-May-08 03:06 3:06:25 AM
              RE: - Sunil Lakshkar  09-May-08 03:14 3:14:00 AM
      check here... - Vasanthakumar D  09-May-08 03:10 3:10:17 AM
          See the code... - shreya verma  09-May-08 03:22 3:22:03 AM
              you are not passing any querystrings to profile page... - Vasanthakumar D  09-May-08 04:21 4:21:11 AM
                  these Errors are coming.... - shreya verma  09-May-08 03:57 3:57:48 AM
                  Plz check it............................... - shreya verma  09-May-08 04:06 4:06:40 AM
                      check here - Vasanthakumar D  09-May-08 04:22 4:22:28 AM
                      check - santhosh kapa  09-May-08 04:25 4:25:11 AM
                          Now..... - shreya verma  09-May-08 04:44 4:44:54 AM
                              hmm.. - santhosh kapa  09-May-08 04:34 4:34:32 AM
              Change - sri sri  09-May-08 03:27 3:27:12 AM
              query string EmpId - sri sri  09-May-08 03:31 3:31:17 AM
                  Thanks - shreya verma  09-May-08 03:36 3:36:41 AM
                  it's Done but.... - shreya verma  09-May-08 04:45 4:45:42 AM
                      Re: - Aravind Kumar  09-May-08 03:41 3:41:22 AM
                          plz highlight it... - shreya verma  09-May-08 03:46 3:46:06 AM
                      check this - sri sri  09-May-08 04:35 4:35:25 AM
                          tell.... - shreya verma  09-May-08 04:42 4:42:49 AM
                              Try this - sri sri  09-May-08 04:58 4:58:45 AM
View Posts