asp.net - Add multiple dynamic classes to LinkButton in a ListView -
i trying add multiple classes linkbutton in listview.
this works:
<asp:linkbutton id="lbattendee" runat="server" cssclass='checkedintrue attendee'>
and works:
<asp:linkbutton id="lbattendee" runat="server" cssclass='<%#eval("checkedin") %>'>
but does not
<asp:linkbutton id="lbattendee" runat="server" cssclass='checkedin<%#eval("checkedin") %> attendee'>
when 3rd way, class rendered literally, this:
<a id="lvattendees_ctrl1_lbattendee" class="checkedin<%#eval("checkedin") %> attendee" href="javascript:__dopostback('lvattendees$ctrl1$lbattendee','')"> <span style="display:none;">2</span> <p class="studentname">joseph conrad</p> <p class="studentid">13526861</p> </a>
try it's work me
<a id="lvattendees_ctrl1_lbattendee" class='<%# string.format("checkedin {0} attendee", eval("checkedin")) %>' href="javascript:__dopostback('lvattendees$ctrl1$lbattendee','')"> <span style="display:none;">2</span> <p class="studentname">joseph conrad</p> <p class="studentid">13526861</p> </a>
Comments
Post a Comment