By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,071 Members | 1,244 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,071 IT Pros & Developers. It's quick & easy.

Properties, Styles and StyleSheets for a web control

P: n/a
A web control can have a ForeColor property, a Style collection which can
define a "color" property, and a CssClass property which also defines a
"color" property.

Which takes precedence?

Is there any programatic examination and manipulation of these properties
allowed and if so where ? eg. the code-behind, or only within the .aspx file
?

I want to be able tom programatically examine the rendered color of a
control and if necessary, change it : any advice on this ?
Nov 18 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
the one defined in web control style collection will take precedence, and
not the one defined in CSSClass.
you can programmatically check it using java-script. (control.style.color)

Av.

"JezB" <je**@somewhere.com> wrote in message
news:eB**************@TK2MSFTNGP12.phx.gbl...
A web control can have a ForeColor property, a Style collection which can
define a "color" property, and a CssClass property which also defines a
"color" property.

Which takes precedence?

Is there any programatic examination and manipulation of these properties
allowed and if so where ? eg. the code-behind, or only within the .aspx
file
?

I want to be able tom programatically examine the rendered color of a
control and if necessary, change it : any advice on this ?

Nov 18 '05 #2

P: n/a
If there is a CSSClass and NOT a style then how can I programatically
determine the colours? MyControl.CssClass will just give me the name of the
style-sheet - from this how can I access it's attributes ?

"avnrao" <av*@newsgroups.com> wrote in message
news:uK****************@TK2MSFTNGP11.phx.gbl...
the one defined in web control style collection will take precedence, and
not the one defined in CSSClass.
you can programmatically check it using java-script. (control.style.color)

Av.

"JezB" <je**@somewhere.com> wrote in message
news:eB**************@TK2MSFTNGP12.phx.gbl...
A web control can have a ForeColor property, a Style collection which can
define a "color" property, and a CssClass property which also defines a
"color" property.

Which takes precedence?

Is there any programatic examination and manipulation of these properties allowed and if so where ? eg. the code-behind, or only within the .aspx
file
?

I want to be able tom programatically examine the rendered color of a
control and if necessary, change it : any advice on this ?


Nov 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.