Nethra R S

Nethra R S

  • NA
  • 310
  • 334.6k

Cant get through this exception

Jul 6 2011 5:42 AM
Hi friends,

I have this update button code below:
protected void btnupdate_Click(object sender, EventArgs e)
    {
       try
        {
            GridViewRow r1=gvProjectDetails.SelectedRow;
            int projectid=Convert.ToInt32(r1.Cells[1].Text);
            pobj.updateprojectdetails(projectid, txtprojname.Text, txtprojdescription.Text, Convert.ToDateTime(txtstartdate.Text), Convert.ToDateTime(txtenddate.Text), Convert.ToInt32(drpteamsize.SelectedValue), Convert.ToInt32(txtduration.Text),drpstatus.SelectedItem.ToString());
            lblmsg.Text = "Project Details updated successfully";
        }
        catch (Exception exc)
        {
            string msg = "Error:";
            msg += exc.Message;
            throw new Exception(msg);
        }
        populateGrid();
    ===============================
I have the same code for another page which works fine. But here i get a conversion failuer though i have converted(the red line in the code where i get this error). plzz correct me

Answers (27)