title: ASP.NET set value in Repeater and have it passed into codebehind
body: <p>I have a list of <code>asp:HyperLink</code> created by a <code>Repeater</code>. When I click on one of these <code>HyperLinks</code> I want it to pass the value set in the <code>HyperLink</code> into the code behind so I know which <code>HyperLink</code> has been clicked. So...</p>
  
  <pre><code>&lt;asp:Repeater id="rpt1" runat="server"&gt;
      ...some rows of HyperLinks..
     &lt;li&gt;&lt;asp:HyperLink ID="hlValue" CssClass='example8' NavigateUrl="#" 
         OnClick="passavalue(books)" &gt;books&lt;/asp:hyperlink&gt;&lt;/li&gt;
      ...
  &lt;/asp:repeater&gt;
  </code></pre>
  
  <p>c#</p>
  
  <pre><code>static void passavalue(string value)
  {
      response.Write(vlaue);
  }
  </code></pre>
  
  <p>I know this wont work I'm just trying to explain what I'm trying to do.</p>