Trying to pass a parameter from a linkbutton embedded in a repeater: Part 2

Posted on 2006-04-08
Last Modified: 2008-03-03

I already posted concerning this issue and thought I had the solution. Now when I run this repeater :

<%--Begin TicketHistoryRepeater--%>
<asp:Repeater ID="TicketHistoryRepeater" runat="server" EnableViewState="true">
        <asp:Label ID="lblTicketID" runat="server" Text=<%#Eval ("TicketID") %>>
        <asp:LinkButton ID="lkSubject" runat="server"
                        Text=<%#Eval("Subject") %>
                        OnClick="ShowAnswerTable(<%#Eval ("TicketID") %>)">
        <asp:Label ID="lblDateOpened" runat="server" Text=<%#Eval ("Date") %>>
        <asp:Label ID="lblStatus" runat="server" Text=<%#Eval ("Status") %>>
<%--End TicketHistoryRepeater--%>

I get this error:

Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Unexpected end of file looking for </asp:LinkButton> tag.

Source Error:

Line 51:       </td>
Line 52:       <td>
Line 53:         <asp:LinkButton ID="lkSubject" runat="server"
Line 54:                         Text=<%#Eval("Subject") %>
Line 55:                         OnClick="ShowAnswerTable(<%#Eval ("TicketID") %>)">

Source File: /MSF/help_desk/view_ticket_history.aspx    Line: 53

It looks like all my tags are lined up correctly. Am I passing the parameter from the link button incorrectly?
Question by:tatton777
    LVL 3

    Expert Comment

    Do you want this to run server side or client side?
    LVL 3

    Expert Comment

    Actually, try changing
    OnClick="ShowAnswerTable(<%#Eval ("TicketID") %>)">
    OnClick='ShowAnswerTable(<%#Eval ("TicketID") %>)'>

    LVL 1

    Author Comment

    I just managed this problem by using the lkSubject_OnClick() method. Thanks.

    Please close this question.

    Accepted Solution

    PAQed with points refunded (250)

    Community Support Moderator

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    INTRODUCTION We all know how to code. But at times you simply want to insert a common code block into your existing code and amend it as per your requirements. This tool not only saves you time but also saves you the pain of typing it all out aga…
    RIA (Rich Internet Application) tools are interactive internet applications which have many of the characteristics of desktop applications. The RIA tools typically deliver output either by the way of a site-specific browser or via browser plug-in. T…
    An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now