I have an ASP.NET / C# application in which the Master Page contain the main menu of my application and several content pages that depend of this master page.
I woul
Was messing around with this for a while as I needed it to be a HTML link. Turns out that you need runat="server" in the e.g.
<head runat="server" id=aHead>
Just for a reference, I needed to do something similar and in order to get it working I added the runat="server" to the body tag (thanks to this thread).
By the way, try
(HtmlGenericControl)currentMenu = (HtmlGenericControl) Master.FindControl("idOfTheLinkToHighlight");
currentMenu.Attributes.Add("class", "selected");
it should work because HtmlGenericControl has also attributes