title: How to get item click event in asp.net repeater control?
body: <p>I am using a repeater control to show some data on my page.</p>
  
  <p>The repeater item template has an image and a label field.</p>
  
  <p>I want that when i click the image , I get an event containing the id field of my data item.</p>
  
  <p>How can I achieve this ?</p>
  
  <p>Actually when I click the image i want to go to another page and want to show detailed information of my data item, in repeater i m just showing short information.</p>
  
  <p>My repeater looks like this:</p>
  
  <pre><code>   &lt;asp:Repeater ID="itemRepeater" runat="server" OnItemCreated="itemRepeater_ItemCreated" &gt;
  
              &lt;ItemTemplate&gt;
                  &lt;tr&gt;
                      &lt;td colspan="2"&gt;
                          &lt;asp:Image ID="phImage" runat="server" ImageUrl='&lt;%#"~/ImageHandler.ashx?id=" + DataBinder.Eval(Container.DataItem, "PhotoID")%&gt;' /&gt;
                      &lt;/td&gt;
                      &lt;td&gt;
                          &lt;asp:Label ID="lblImageName" runat="server" Text='&lt;%# DataBinder.Eval(Container.DataItem, "Name") %&gt;' /&gt;
                      &lt;/td&gt;
                  &lt;/tr&gt;
              &lt;/ItemTemplate&gt;  
   &lt;/asp:Repeater&gt;
  </code></pre>
  
  <p>I want to get <code>PhotoID</code>     in the event when i click the image.</p>
  
  <p>My photo class looks like this:   </p>
  
  <pre><code> public class PhotoDC
      {     
          public byte[] ImagebyteArray { get; set; }     
          public string Name { get; set; }
          public int PhotoID { get; set; }
      }
  </code></pre>
  
  <p>I have been doing winform programming just started web, maybe it is easy but i m struggling to find a solution.</p>
  
  <p>I somehow managed to show hand cursor when i hover the image though.</p>