On the main F5 page, I needed a way to adjust the CSS properties on the menu based on what is in a content page. Enter ASP.NET literals. Essentially a literal lives up to its name… it allows you to define literal html.
So, in the master I have:
How do I manipulate that to trigger the proper CSS class you ask? By doing this in the code behind on the content page:
protected void Page_Load(object sender, EventArgs e)
Literal menucontrol = Page.Master.FindControl("lit_About") as Literal;
menucontrol.Text = "<li class='active'>About</li>";