title: A VB.Net function could not execute by a GridViewCommandEventArgs
body: <p>I am developing an ASP.Net Website. I used GridView to display some information which in the database. Moreover, I put a button on each row in the GridView and set the CommandName of the button.</p>
  
  <p>In the web page:</p>
  
  <blockquote>
    <p>asp:Button ID="btnShip" runat="server"
    CommandArgument='&lt;%#Eval("Invoice_No") %>' CommandName="Ship"
    Text="Ship" Visible="True"</p>
  </blockquote>
  
  <p>And then I create a VB function to handle the GridViewCommandEventArgs of this GridView. This is the following coding:</p>
  
  <blockquote>
    <p>Protected Sub Purchase_Process_RowCommand(ByVal sender As Object,
    ByVal e As GridViewCommandEventArgs) Handles GridView1.RowCommand</p>
    
    <p>If e.CommandName = "Ship" Then .....</p>
  </blockquote>
  
  <p>Basically, it should do something If I press the button with CommandName "Ship". However, it doesn't work.
  I tried to create a empty webpage and then copy the code into that page. It was working fine for a little moment...</p>
  
  <p>I also put a MsgBox() before the If statement and I found the function won't execute when I press the button in the GridView.</p>