Adding single click event to multiple linkbuttons
<p>I have looked at other post but nothing explained what I want to do very well.</p>

<p>At runtime I have x amount of LinkButtons added to the form by a repeater dependant on the data it retrieves from the database:</p>

<pre><code>&lt;asp:Repeater ID="variantRepeat" runat="server" 
    onitemcommand="variantRepeat_ItemCommand"&gt;
    &lt;HeaderTemplate&gt;&lt;ul&gt;&lt;/HeaderTemplate&gt;
    &lt;ItemTemplate&gt;&lt;li&gt;&lt;asp:LinkButton ID="varLink" runat="server" CommandName="Click" CommandArgument='&lt;%# Eval("variantID") %&gt;'&gt;&lt;%# Eval ("variant_name") %&gt;&lt;/asp:LinkButton&gt;&lt;/li&gt;&lt;/ItemTemplate&gt;
    &lt;FooterTemplate&gt;&lt;/ul&gt;&lt;/FooterTemplate&gt;
&lt;/asp:Repeater&gt;
</code></pre>

<p>It is supposed to, when clicked Fire of an event backstage</p>

<pre><code>    protected void varLink_Click(object sender, EventArgs e)
    {
        ViewCollection views = prodView.Views;
    }
</code></pre>

<p>Then set up some views. However I need the CommandArgument to go through as that holds the key to look up inside the <code>prodView.Views</code> .</p>

<p>It doesn't have to be <code>variantID</code> that is passed but could be and Int depending on which one, just need some indication as to what view to display!</p>

<p>I have all the views created at page init and added to the page dynamically at init.</p>

<p>I use the entity framework to query the database through a few views! (found that to be easier to get complex data from relational databases!)</p>

<p>I don't know how to link up all those LinkButtons so that I can programmatically switch views?</p>
