title: ImageButton OnClick event not working in asp.net
body: <p>I have an Imageutton in asp.net. I want when I clicked on it, an event fire (that code of this event is written in c#).</p>
  
  <p>asp code is:</p>
  
  <pre><code>&lt;div align="right"&gt;
      &lt;table dir="rtl"&gt;
          &lt;tr&gt;
              &lt;td&gt;
                  &lt;asp:ImageButton ID="imgScoreStar1" runat="server" ImageUrl="~/Images/ScoreStars/Star0_28px.png" OnClick="Star_Onclick" /&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
      &lt;/table&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>and behind code is:</p>
  
  <pre><code>protected void Star_Onclick(object sender, ImageClickEventArgs e)
  {
      //do something
  }
  </code></pre>
  
  <p>but ever fire click event (I tested it by breakpoint).</p>
  
  <p>Another question: When I click on ImageButton, postback happens. how can I avoid this?</p>
  
  <p>Thank.</p>