asp.net - Add class to list item with VB -


i have list in asp.net this:

<ul id="menu" runat="server">   <li class="themenu"><a href="#">menu 1</a></li>   <li class="themenu"><a href="#">menu 2</a></li>   <li class="themenu"><a href="#">menu 3</a></li>   <li class="themenu"><a href="#">menu 4</a></li> </ul> 

i want add class list item when clicked using vb.net. user can see menu item "active one" done using jquery:

$(".themenu").click(function() {   $(this).addclass("active"); }); 

how do using vb.net???

just use jquery. really. doing vb.net means have cause postback, , means re-creating page on server. don't want more have to. adds load server, , adds latency page responses.

i suspect want know later on item marked active, suggest combining <asp:hiddenfield> control, , add line jquery set value of hidden input created control. later on, when need know in vb.net list item marked active, can check hidden field.


Comments

Popular posts from this blog

searchKeyword not working in AngularJS filter -

sequelize.js - Sequelize: sort by enum cases -

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -