kalpana jaiswal

kalpana jaiswal

  • NA
  • 45
  • 9.7k

what is the meaning of exception System.FormatException

Mar 8 2016 1:07 PM
in this code it gives the System.FormatException . So what is the solution for it?
 
private DataSet getData()
{
using (SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["DiabeticCareCenterDbConnectionString"].ConnectionString))
{
if (con.State != ConnectionState.Closed)
{
con.Open();
}
SqlCommand cmd = new SqlCommand("select DId,FName+' '+LName as FullName,Qualification,InTime+' - '+OutTime as Timing,Photo from Doctor", con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
da.Fill(ds);
return ds;
}
}
protected void FixAppointment_Click(object sender, EventArgs e)
{
int dr = Convert.ToInt32(((Button)sender).CommandArgument);//error occours here.
Response.Redirect("Home.aspx");
}
 

Answers (1)