C# – How to change HTML elements attributes

My master page contains a list as shown here. What I’d like to do though, is add the “class=active” attribute to the list li thats currently active but I have no idea how to do this. I know that the code goes in the aspx page’s page_load event, but no idea how to access the li I need to add the attribute. Please enlighten me. Many thanks.

How to call a asp:Button OnClick event using JavaScript?

I have a question, I have a button like below: <asp:Button ID="savebtn" runat="server" OnClick="savebtn_Click" Visible="false" /> I then have HTML button like like below: <button id="btnsave" onclick="fncsave">Save</button> I have the javascript below: <script type="text/javascript"> function fncsave() { document.getElementById('<%= savebtn.OnClick %>').click() } </script> My question now is, how can I call the asp:Button OnClick from the … Read more