CssClass Property

Discussion in 'ASP .Net' started by CMM, Mar 20, 2006.

  1. CMM

    CMM Guest

    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
    CMM, Mar 20, 2006
    #1
    1. Advertising

  2. CMM

    Jason Hales Guest

    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">
    Jason Hales, Mar 20, 2006
    #2
    1. Advertising

  3. CMM

    CMM Guest

    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" <> wrote in message
    news:...
    > 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">
    >
    CMM, Mar 20, 2006
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mervin Williams

    Setting CSSClass property of Label control?

    Mervin Williams, Apr 6, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    3,502
    Scott
    Apr 6, 2004
  2. Ric Pullen
    Replies:
    1
    Views:
    514
    =?Utf-8?B?VGltOjouLg==?=
    Aug 5, 2004
  3. George Jordanov Ivanov

    Literal control doesn't have CssClass property?

    George Jordanov Ivanov, Mar 30, 2006, in forum: ASP .Net
    Replies:
    6
    Views:
    15,336
    WarNov
    Sep 13, 2006
  4. =?Utf-8?B?QVNQIERldmVsb3Blcg==?=

    CssClass property is ignored with wizard control (For some Users)

    =?Utf-8?B?QVNQIERldmVsb3Blcg==?=, Sep 19, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    591
    =?Utf-8?B?QVNQIERldmVsb3Blcg==?=
    Sep 19, 2006
  5. Sky
    Replies:
    2
    Views:
    278
    Robert Koritnik
    Oct 1, 2004
Loading...

Share This Page