title: EndExecuteNonQuery Error
body: <p>i have an error as which is on the button click event, as its shows me an error message on this line:</p>
  
  <p>com.EndExecuteNonQuery();</p>
  
  <p>message text: Error 2 No overload for method 'EndExecuteNonQuery' takes 0 arguments</p>
  
  <p>Thank you for your support</p>
  
  <pre><code>  protected void Page_Load(object sender, EventArgs e)
  {
      if (IsPostBack)
      {
          SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["usradmadslistview"].ConnectionString);
          conn.Open();
  
          string cmdStr = "Select count(*) from UserInfo where UID = '" + UsrNme.Text + "'";
          SqlCommand com = new SqlCommand(cmdStr, conn);
          int temp = Convert.ToInt32(com.ExecuteScalar().ToString());
  
  
          if (temp == 1)
          {
              chkusrnamlbl.Visible = true;
          }
  
          conn.Close();
      }
  }
  
  
  
  
  
  protected void btnSave_Click(object sender, EventArgs e)
  {
      try
      {
          SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["usradmadslistview"].ConnectionString);
          conn.Open();
  
          string insertquery = "insert into UserInfo (UID,FN,LN,Password,Email,CountID,State,City) Values (@username,@firstn,@lastn,@passbox,@email1,@country,@state,@city)";
          SqlCommand com = new SqlCommand(insertquery, conn);
          com.Parameters.AddWithValue("@username", UsrNme.Text);
          com.Parameters.AddWithValue("@firstn", fnbox.Text);
          com.Parameters.AddWithValue("@lastn", lnamebox.Text);
          com.Parameters.AddWithValue("@passbox", passtxtbx1.Text);
          com.Parameters.AddWithValue("@email1", emailbox.Text);
          com.Parameters.AddWithValue("@country", DrDncoundrlst.SelectedItem.ToString());
          com.Parameters.AddWithValue("@state", DropDownListSwestate.SelectedItem.ToString());
          com.Parameters.AddWithValue("@city", citytxtbox.Text);
  
          com.EndExecuteNonQuery();
          Response.Redirect("User panel.aspx");
  
          conn.Close();
      }
  
     catch(Exception ex) {
          Response.Write("Error:" + ex.ToString());
      }
  </code></pre>