title: ASP ImageButton vs Button
body: <p>I am new to asp.net stuff and I am pretty confused on how to fix this problem. I have the back code written for everything and right now I am just making everything "look pretty". Originally I had an ASP button to submit a form for something. Now I want the button to be an ASP ImageButton. However now my method is returning an error due to this change. This is what it looks like:</p>
  
  <pre><code> //.ascx file
   &lt;div id="eSubmit"&gt;
      &lt;asp:ImageButton id="btnSubmit1" runat="server" ImageUrl="~/Style/Images/addButtonE.png" /&gt;
  &lt;/div&gt;
  
  
   //method behind
   void btnSubmit_Click(object sender, EventArgs e)
      {
          if (!Page.IsValid) { return; }
  
          try
          {
              //do some data checking
              //bind entries
          }
          catch (ApplicationException ax)
          {
              ;
          }
      }
  </code></pre>
  
  <p>The error that is generated after changing the button to imagebutton is:</p>
  
  <blockquote>
    <p>Cannot convert 'System.EventHandler' to
    'System.Web.UI.ImageClickEventHandler'</p>
  </blockquote>
  
  <p>So my main question is: How do I fix this error? And will this effect the data I am sending to the server in anyway (will this cause different behavior then when it was just a button)?</p>