CssClass Property

C

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.
 
J

Jason Hales

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">
 
C

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top