473,466 Members | 1,408 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Properties, Styles and StyleSheets for a web control

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
2 1029
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Jeff Thies | last post by:
I have a number of elements of "some-class". I'd like to change the styles of some-class: from ..some-class{color: red; display: block} to
18
by: Toronto Web Designer | last post by:
I'm having trouble with the padding and margin properties. IE tends to be happier with the padding and Netscape with the margin property. So I tried this: <link href="netscape-styles.css"...
3
by: JezB | last post by:
What's the generally accepted approach for using Styles and Stylesheets in a web application based on .aspx files, Web Controls, User Controls, and code-behind modules (c# in my case)? Most style...
1
by: Eric Lindsay | last post by:
I am trying to understand the differences between and uses of persistent, default and alternate styles. I have read http://www.w3.org/TR/REC-html40/present/styles.html section 14.3.2 on...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.