473,789 Members | 2,703 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 1162
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.Attri butes("class") = "ControlStyle1B "

Web Control:
myControl.CssCl ass="ControlSty le1B"

--

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

Bobby Ryzhy
bobby@ name of domain below
http://www.weekendtech.net
On Thu, 8 Jul 2004 12:01:51 -0400, "Brian Henry"
<br**********@n ewsgroups.nospa m> 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
ControlStyle 1B 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******** ********@TK2MSF TNGP12.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.Attri butes("class") = "ControlStyle1B "

Web Control:
myControl.CssCl ass="ControlSty le1B"

--

Jos Branders

Nov 18 '05 #4

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

Similar topics

4
7516
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 from the process. It occurred to me that I could also enumerate the properties of the ADO Recordset in similar fashion, expecting to get back known properties such as AbsolutePosition, BOF, EOF, Filter, Sort, etc. I inserted the following
18
18420
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 a remote update of tables and fields and can't find enough information on these things. Also, how do you index a field in code?
6
6983
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
7089
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
2347
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 are set to the value of the last control. I found this link: http://www.codecomments.com/archive315-2005-1-366113.html which I think explains the situation but I'm not sure how to implement the solution in my case since I am not using a .ascx...
5
3102
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 the code I check to see if the combobox has any items, if so then I set it to 0 with out issue. Then a bit later in the code I try to set it to the last server used.
3
2007
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 'SelectedValue' gets or sets the value of the member property specified by the ValueMember property. *ValueMember* - Help says that the 'ValueMember' Gets or sets the property to use as the actual value for the items in the ListControl.
7
2009
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
1646
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 website the menu items default to forecolor=green and onHover=orange. I am setting and binding the sitemap provider programmatically at runtime. Could this be why the properties are not being applied?
17
2787
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 Bad. So maybe we've got over that. I suppose properties could have Bad consequences if a user doesn't know they exist and think that a certain property of an object is just an ordinary attribute. But that applies to
0
9666
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9511
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10410
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10200
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10139
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6769
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5418
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5551
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4093
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 we have to send another system

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.