title: Postback using button in GridView
body: <p>I have the following in an ASP.NET GridView:</p>
  
  <pre><code>&lt;asp:TemplateField&gt;
    &lt;ItemTemplate&gt;
  
      &lt;asp:ImageButton ID="ibtnDown" runat="server" ToolTip="Down" CommandName="Down" 
        ImageUrl="~/images/arrow.png" Width="16px" Height="16px" 
        CommandArgument="&lt;%# Container.DataItemIndex %&gt;" /&gt;
  
    &lt;/ItemTemplate&gt;
  &lt;/asp:TemplateField&gt;
  </code></pre>
  
  <p>It's simply an image button that when clicked raises the RowCommand event for the GridView. It is very convenient in that it allows me to use the CommandName and CommandArgument in order to determine the button that was clicked and for which row it was clicked.</p>
  
  <p>However, I find that the .NET ImageButton is limited in that it can't display CSS sprites in order to change the image on mouseover. At least I couldn't get it to work, but of course that doesn't preclude some manner in which it's possible.</p>
  
  <p>Anyway, I'd like to use a standard HTML button tag because I know how to get it to work with my sprites. </p>
  
  <pre><code>&lt;button name="btnDown" id="btnDown" type="submit" class="downArrow"&gt;&lt;/button&gt;
  </code></pre>
  
  <p>But what I don't know how to do is get the button to cause a postback and raise the RowCommand event and still allow me to somehow access the CommandArgument and CommandName parameters.</p>