tatton777
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.a spx Line: 53
It looks like all my tags are lined up correctly. Am I passing the parameter from the link button incorrectly?
I already posted concerning this issue and thought I had the solution. Now when I run this repeater :
<%--Begin TicketHistoryRepeater--%>
<asp:Repeater ID="TicketHistoryRepeater"
<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(<
</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(<
Source File: /MSF/help_desk/view_ticket
It looks like all my tags are lined up correctly. Am I passing the parameter from the link button incorrectly?
Do you want this to run server side or client side?
Actually, try changing
OnClick="ShowAnswerTable(< %#Eval ("TicketID") %>)">
To
OnClick='ShowAnswerTable(< %#Eval ("TicketID") %>)'>
OnClick="ShowAnswerTable(<
To
OnClick='ShowAnswerTable(<
ASKER
I just managed this problem by using the lkSubject_OnClick() method. Thanks.
Please close this question.
Please close this question.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.