Or see my other post (basically you perhaps "inject" those CSS changes
inside your ASPX page to "overrides" previously defined values).
Why do you have so much changes ? Do you alter the appearance based on the
current state of something ?
"Will" <
[email protected]> a écrit dans le message de (e-mail address removed)...
That was the original route I went, making a different class, and alt,
and then swaping thoses around, that was after looking at at themes.
However that because a mess because it is more then 1 CSS class.
I then tried to add mutliple CSS classes but that just ran into
problems on that. So the next idea was just modify the CSS class as
needed, since it is so easy to do with IDs. As it is I now I am more
interested in it from a curiosity standpoint.
What is this then ? You can always change the class name.
IMO it will more manageable to change the classname depending on whatever
the condition is rather than to alter the class definition (is this what
you
had in mind ?). You could do this frlom ASPX (after all an ASPX page could
perfectly serve CSS content) or using javascript.
Knowing what exactly you are trying to do could perhaps allows someone to
sugest another approach for the problem you try to solve (for example my
first thought would be rather to have a "MyName" and "MyName_Alternate"
class and to use the appropriate name depending on whatever the condition
is.
"Will" <
[email protected]> a écrit dans le message de (e-mail address removed)...
Most of the time it will not be a webcontrol.
So far the two solutions I have come up with are, hardcode the ID of
each object I need to apply this to or write some asp.net that
modifies some javascript since javascript can easily make a change to
a css class.
If it's a WebControl, change the CssClass property.
--
HTH,
Kevin Spencer
Microsoft MVP
Software Composerhttp://unclechutney.blogspot.com
The shortest distance between 2 points is a curve.
I have given up looking for a solution so I figured I would break down
and ask.
I am trying to modify a CSS class in page_load. I have no problem
doing it with an ID with the simple
HTMLID.Style["width"] = "10px";
however I need to apply it to a CSS class not a single ID.
What is the code for that?
Thanks- Hide quoted text -
- Show quoted text -- Hide quoted text -