I have the following code to get the current URI and then a conditional to say "if" then perform a certain action. How would I apply a certain CSS style to an element ID?
I've read something about using runat="server" on the element ID I want to change, but I can't find anything do assist with CSS selectors.
@{
string CurrentUrl = Request.Url.AbsoluteUri;
}
@if (CurrentUrl.Contains("3d-printer"))
{
//CSS Condition goes here
}
Go to the complete details ...