Results 1 to 3 of 3

Thread: Template and Link button * Resolved *

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member MarkusJ_NZ's Avatar
    Join Date
    Jun 2001
    Posts
    375

    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:
    1. <ItemTemplate>
    2.  <span class="header">Description</span><br>
    3. <%# DataBinder.Eval(Container.DataItem, "Description")%>
    4.  </ItemTemplate>

    I realise that I can add in a link button to the template like so

    VB Code:
    1. <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
    Last edited by MarkusJ_NZ; May 20th, 2003 at 09:26 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width