c# - Show linkbutton inside Repeater active on click -
c# - Show linkbutton inside Repeater active on click -
generate z linkbutton, want show alphabet linkbutton active on click. either jquery or code behind.
<asp:updatepanel id="updatepanel3" runat="server"> <contenttemplate> <asp:repeater id="rptalphabets" runat="server"> <itemtemplate> <asp:linkbutton id="lnkalphabet" runat="server" text='<%#eval("value")%>' onclick="alphabet_click" cssclass="listbtn" width="31px" height="15px" align="center" commandname="getalphabet" /> <div class="clear-list"> </div> </itemtemplate> </asp:repeater> </contenttemplate> <triggers> <asp:asyncpostbacktrigger controlid="rptalphabets" /> </triggers> </asp:updatepanel>
if mean highlight selected button out of groyp.. yes can using css , jquery..
use below snippet...
<style> .listbtn { border: 1px solid #bbb; border-radius: 2px; background-color: #eee; text-decoration: none; width: auto!important; padding: 3px; } .selected { background-color: #222; color: white; } </style> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script> $(document).ready(function () { $('.listbtn').click(function (e) { e.preventdefault(); $('.listbtn').each(function () { $(this).removeclass('selected'); }); $(this).addclass('selected'); }); }); </script>
c# jquery asp.net vb.net c#-4.0
Comments
Post a Comment