How do I pass a parameter from a hyperlinkbutton embedded in a repeater?

The subject line pretty much says it all.

I want to have a hyperlinkbutton embbeded in a repeater. I want to dynamically create the parameter that will be passed into a method based on whatever is loaded into the hyperlinkbutton on the databind() event. Here is the code that is NOT working. When I go to buld the site I get this message "Server tags cannot contain <% ... %>"

<%--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 know that this may be easy, but I have a april 19th deadline I'm fighting. So, 500 points it is. THANKS!
LVL 1
tatton777Asked:
Who is Participating?
 
aki4uCommented:
you must replace: Text=<%#Eval ("field") %>
with this: Text='<%#Eval ("field") %>'
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.