473,508 Members | 4,779 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

setting css properties of items

I have my styles.css file filed with the styles used for the site, now how
would i specify a control to have a certain style id from that styles.css
file in code?

i thought mycontrol.style would do it but that seems to only be making one
at a time changes, i want to be able to say this control is using the style
ControlStyle1B from styles.css and if it's not validated property I want to
use ControlStyle1F and so on.. how would i programaticly set the style id
form the css file? thanks
Nov 18 '05 #1
3 1151
Jos
Brian Henry wrote:
I have my styles.css file filed with the styles used for the site,
now how would i specify a control to have a certain style id from
that styles.css file in code?

i thought mycontrol.style would do it but that seems to only be
making one at a time changes, i want to be able to say this control
is using the style ControlStyle1B from styles.css and if it's not
validated property I want to use ControlStyle1F and so on.. how would
i programaticly set the style id form the css file? thanks


HTML Control:
myControl.Attributes("class") = "ControlStyle1B"

Web Control:
myControl.CssClass="ControlStyle1B"

--

Jos Branders
Nov 18 '05 #2
<asp:Table ID="_table" Runat="server" CssClass="classABC">

Bobby Ryzhy
bobby@ name of domain below
http://www.weekendtech.net
On Thu, 8 Jul 2004 12:01:51 -0400, "Brian Henry"
<br**********@newsgroups.nospam> wrote:
I have my styles.css file filed with the styles used for the site, now how
would i specify a control to have a certain style id from that styles.css
file in code?

i thought mycontrol.style would do it but that seems to only be making one
at a time changes, i want to be able to say this control is using the style
ControlStyle1B from styles.css and if it's not validated property I want to
use ControlStyle1F and so on.. how would i programaticly set the style id
form the css file? thanks


Nov 18 '05 #3
thats the one i was looking for, thanks

"Jos" <jo***************@fastmail.fm> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Brian Henry wrote:
I have my styles.css file filed with the styles used for the site,
now how would i specify a control to have a certain style id from
that styles.css file in code?

i thought mycontrol.style would do it but that seems to only be
making one at a time changes, i want to be able to say this control
is using the style ControlStyle1B from styles.css and if it's not
validated property I want to use ControlStyle1F and so on.. how would
i programaticly set the style id form the css file? thanks


HTML Control:
myControl.Attributes("class") = "ControlStyle1B"

Web Control:
myControl.CssClass="ControlStyle1B"

--

Jos Branders

Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
7488
by: Lyn | last post by:
Hi, This question may seem a bit academic... To learn more about Access VBA, I have been enumerating the properties of various form controls. This was mostly successful and I have learned a lot...
18
18308
by: Dixie | last post by:
Can I set the Format property in a date/time field in code? Can I set the Input Mask in a date/time field in code? Can I set the Format of a Yes/No field to Checkbox in code? I am working on...
6
6957
by: Peter Krikelis | last post by:
Hi All, I am having a problem setting up input mode for serial communications. (Sorry about the long code post). The following code is what I use to set up my comm port.
4
7071
by: Tamir Khason | last post by:
How can I set the type of the object added to ArrayList (type of Array List Members) Here is the code: protected ArrayList tabs = new ArrayList(); public ArrayList Tabs {
9
2329
by: james.e.coleman | last post by:
Hello, I have created a custom dropdownlist that is used multiple times within a single page. When trying to set the values of the controls with the page in which they are being used, they all...
5
3088
by: john.halet | last post by:
This line of code had been working with out issue, now its throwing errors. In my case I have three items in the ComboBox. If I try to change the selected index it throw the error. Earler in...
3
1999
by: dbuchanan | last post by:
These setting mystify me for these reasons. *SelectedItem* - Help says that 'SelectedItem' gets or sets the currently selected item in the combobox. *SelectedValue* - Help says that...
7
1994
by: Ronald S. Cook | last post by:
In a .NET Windows app, if I set somehting like the title of the form to "MyApp" at run-time, will that make the app run slightly slower than if I had set the title at design-time? Thanks, Ron
2
1631
by: SE.Computerguy | last post by:
I have a webcontrols menu on my webform (masterpage) that does not display the font color properties I set. In the IDE I set the properties and can see them in the html code but when I run the...
17
2753
by: David C. Ullrich | last post by:
Having a hard time phrasing this in the form of a question... The other day I saw a thread where someone asked about overrideable properties and nobody offered the advice that properties are...
0
7228
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7502
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
5635
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5057
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4715
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
3206
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3191
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1565
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 ...
1
769
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.