Link to home
Start Free TrialLog in
Avatar of tatton777
tatton777Flag for United States of America

asked on

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

Hello,

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">
  <ItemTemplate>
    <tr>
      <td>
        <asp:Label ID="lblTicketID" runat="server" Text=<%#Eval ("TicketID") %>>
        </asp:Label>                                
      </td>
      <td>
        <asp:LinkButton ID="lkSubject" runat="server"
                        Text=<%#Eval("Subject") %>
                        OnClick="ShowAnswerTable(<%#Eval ("TicketID") %>)">
        </asp:LinkButton>
      </td>
      <td>
        <asp:Label ID="lblDateOpened" runat="server" Text=<%#Eval ("Date") %>>
        </asp:Label>
      </td>
      <td>
        <asp:Label ID="lblStatus" runat="server" Text=<%#Eval ("Status") %>>
        </asp:Label>
      </td>
    </tr>
  </ItemTemplate>                        
</asp:Repeater>
<%--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?
Avatar of gsalier
gsalier

Do you want this to run server side or client side?
Actually, try changing
OnClick="ShowAnswerTable(<%#Eval ("TicketID") %>)">
To
OnClick='ShowAnswerTable(<%#Eval ("TicketID") %>)'>


Avatar of tatton777

ASKER

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

Please close this question.
ASKER CERTIFIED SOLUTION
Avatar of GranMod
GranMod

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial