Template and Link button * Resolved *
Hi all, I have a datalist that I use in conjunction with a template to display records retrieved from a database. Datalist is databound to a dataset
What I would like to be able to do is add in a link button to each record in the template that when clicked captures the associated description of the record.
Below is my code for displaying just the description field in the dataset
VB Code:
<ItemTemplate>
<span class="header">Description</span><br>
<%# DataBinder.Eval(Container.DataItem, "Description")%>
</ItemTemplate>
I realise that I can add in a link button to the template like so
VB Code:
<asp:LinkButton ID="lnkMe" Runat="server">Add me</asp:LinkButton>
How can I utilise the above link button to store the associated description in a collection when a user clicks on a records link button?
I would prefer to do it in code-behind in my index.aspx.vb page
Thanks in advance
MarkusJ