473,406 Members | 2,705 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

CssClass Property

CMM
I'm not sure I completely understand how to use stylesheets in the WebForms
designer (I know how to do it in source). Seems to me that even though you
associate a CSS with a webform, none of the styles appear as options in
either the CssClass property (for WebControls) or the Style property (for
reguler ol' HTMLControls) or in the BlockFormat dropdown on the toolbar (for
editing regular flowing text).

Is this a glaring oversight on the part of the webform designer team or am I
missing something? Seems like a very redimentary productivity feature to me.
I dunno.

--
-C. Moya
www.cmoya.com
Mar 20 '06 #1
2 1381
The cssclass only stores a string identiftying the name of the element
from your CSS definition. At runtime it translates into
class="myClass":

For example
<asp:TextBox id="TextBox" CssClass="TxtRequired" />

At runtime the HTML looks like this:
<input type=text class="TxtRequired">

Mar 20 '06 #2
CMM
I know what it does. I'm wondering why it's not a dropdown that presents me
with a picklist of the styles attached to the page. Is there ANY way to
visually assign style classes (.style) to items in the Webform Designer.

I mean, in that case, what's the point of the "Stylesheet" property for the
page/document in the Property Editor?

And, that reminds me... why can't I pick multiple css's anyway in this
property? Shouldn't the property be a string "collection" property? It's
common to attach multiple stylesheets to a page via multiple <Link> tags.
Why doesn't the Webform Desginer support it? Seems like a no-brainer to me.

P.S. I know, I know... switch to Source view and do it by hand. It just
seems to me that the Webform designer (even-- especially!--- in the much
ballyhooed, gee-whiz, second-coming VS 2005) is way lame.

--
-C. Moya
www.cmoya.com
"Jason Hales" <ja*********@yahoo.com> wrote in message
news:11**********************@j33g2000cwa.googlegr oups.com...
The cssclass only stores a string identiftying the name of the element
from your CSS definition. At runtime it translates into
class="myClass":

For example
<asp:TextBox id="TextBox" CssClass="TxtRequired" />

At runtime the HTML looks like this:
<input type=text class="TxtRequired">

Mar 20 '06 #3

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

Similar topics

1
by: Mervin Williams | last post by:
I am having a problem setting the CSSClass property of a my Label control. I set CSSClass property, but its not taking the font style settings. Here is my style: ..TabText { font-weight:...
0
by: Steve Kallal | last post by:
I have a DataGrid with an EditCommandColumn column set to a type of PushButton. I want to set set CssClass on these buttons and cannot without using code-behind code on the ItemDataBound event. The...
6
by: msuk | last post by:
All, I have a ASP.NET/C# webform which contains a Webform button that has a CssClass applied to give it a special effect. Now the same webform has a filefield control but the browse button is...
6
by: tshad | last post by:
Are Validators able to use CSSClass? I have the following: <asp:RegularExpressionValidator ControlToValidate="txtEmail" CssClass="errorMessage" Text = "Invalid Email Address!"...
1
by: chrisfox | last post by:
Hi, I try to customize the style of my Webparts with a CSS Stylesheet. Therefore I define a CSS File and define some CSS Classes. Now a problem occurs. Some of the classes have no effect on the...
1
by: kurt sune | last post by:
I am doing a custom control. It contains a label and a textbox and a button. The class inherits WebControl. Thus the control gets a property CssClass visible in the Properties window. ...
6
by: Larry Bud | last post by:
Can it be done? I have a table, and in the <TDI have <Td runat="server" id="mycell" class="myclass"></td> In the code behind, I can access mycell.style, but there is no mycell.CssClass...
1
by: Jonathan Wood | last post by:
Greetings, On a GridView control, I want to show alternating colors. But instead of alternating on each row, I want to alternate each group. So several items would be one color and the next...
0
by: HillBilly | last post by:
MasterPages again. Three LinkButtons are being used as styled tabs in the content page that will load a different ListView when a tab is selected: TabA, TabB or TabC. The LinkButtons are declared...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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...
0
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
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,...
0
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...

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.