title: GridviewRowCommand not firing
body: <p>I've got a gridview, which each row have a edit and a delete button.
  I've managed to put my edit button working, but not the delete button.
  Here's my aspx:</p>
  
  <pre><code>&lt;asp:GridView ID="gvfaq" runat="server" AutoGenerateColumns="false" DataKeyNames="faq_id" OnRowDataBound="gvfaq_RowDataBound" OnRowCommand="gvfaq_RowCommand" OnRowDeleting="gvfaq_RowDeleting" &gt;
          &lt;Columns&gt;
              &lt;asp:BoundField ItemStyle-Width="100px" DataField="text" HeaderText="Text" /&gt;
              &lt;asp:TemplateField HeaderText=""&gt;
                  &lt;ItemTemplate&gt;
                      &lt;asp:Button runat="server" ID="editbutton" CommandArgument='&lt;%# Eval("faq_id") %&gt;' CommandName="Edit" Text="Edit" /&gt;
                      &lt;asp:Button runat="server" ID="delbutton" CommandArgument='&lt;%# Eval("faq_id") %&gt;' CommandName="Delete" Text="Delete" /&gt;
                  &lt;/ItemTemplate&gt;
              &lt;/asp:TemplateField&gt;
          &lt;/Columns&gt;
      &lt;/asp:GridView&gt;
  </code></pre>
  
  <p>And this is my code behind:</p>
  
  <pre><code>protected void gvfaq_RowCommand(object sender, GridViewCommandEventArgs e)
  {
      if (e.CommandName == "Delete")
      {
          int ID = Convert.ToInt32(e.CommandArgument);
          DeleteFAQ(ID);
      }
  }
  
  protected void gvfaq_RowDataBound(object sender, GridViewRowEventArgs e)
  {
      if (e.Row.RowType == DataControlRowType.DataRow)
      {
          Button l1 = (Button)e.Row.FindControl("editbutton");
          l1.Attributes.Add("onclick", "Javascript:suport(" + l1.CommandArgument.ToString() + ");return false;");
          l1.Attributes.Add("onClientClick", "Javascript:suport(" + l1.CommandArgument.ToString() + ");return false;");
          Button l2 = (Button)e.Row.FindControl("delbutton");
          l2.Attributes.Add("onclick", "javascript:return confirm('Are you sure you want to delete this record?')");
          l2.Attributes.Add("onClientClick", "javascript:return confirm('Are you sure you want to delete this record?')");
      }
  }
  
  protected void gvfaq_RowDeleting(object sender, GridViewDeleteEventArgs e)
  {
      GridView gv = (GridView)this.FindControl("gvfaq");
      int ID = (int)gv.DataKeys[e.RowIndex].Value;
      DeleteFAQ(ID);
  }
  
  protected void DeleteFAQ(int ID)
  {
      using (SqlCommand myCommand = new SqlCommand())
      using (SqlConnection myServerCreate = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["ServerCreate"].ConnectionString))
      {
          myServerCreate.Open();
          myCommand.Connection = myServerCreate;
          myCommand.CommandText = "delete from faq where faq_id = " + ID;
          myCommand.ExecuteNonQuery();
      }
      ScriptManager.RegisterStartupScript(Page, typeof(Page), "Close", "__doPostBack('','Delete');", true);
  }
  </code></pre>
  
  <p>The strange, is that I have another page, from where I copied/rearragend this code, and there is working fine.</p>
  
  <p>Thanks.</p>
  
  <p><strong>UPDATE</strong>
  If I check the html generated on the other page button, this code is added, which doesn't succeed in this:</p>
  
  <pre><code>WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$MainContent$gvDocuments$ctl02$delbutton", "", true, "", "", false, false))
  </code></pre>