Home » Posts tagged "class"

Finding a CSS Class Definition

seagull A couple of weeks ago I pointed out that you could easily find the definition of a property, method, variable, or class by right-clicking the item and selecting, “Go To Definition” from the context menu.

You can also use this feature in your ASPX files to find the definition of CSS classes.  However, you cannot use this to find definitions of rules.  And if the class is not defined, you will not see the menu option and you’ll get a green squiggly under the class and the tooltip will tell you that the class is not defined.

Continue reading “Finding a CSS Class Definition”

Dynamically Change class Attribute From ASP.NET

B03B0015 I recently received a question from another programmer I know who’s been using PHP prior to ASP.NET that made me think harder about a problem we’ve all had in ASP.NET.  The basic problem is this:

How do you dynamically change the class of a hyperlink based on the page name so that the hyperlink that represents the current page is styled differently than all of the other hyperlinks on our screen?  If you want you can substitute any other HTML element you want, but the problem remains the same.

Continue reading “Dynamically Change class Attribute From ASP.NET”