Assign CssClass and Read Styles

Discussion in 'ASP .Net Web Controls' started by Shane Walters, Mar 3, 2005.

  1. Is it possible to programmatically read the styles applied to a control from
    a CssClass assignment? My idea is straight forward, but I've looked at
    ControlStyle, Style, and individual properties (such as Control.Font.Bold),
    but to no avail. Is there a class that can parse CSS input (file, inline,
    anything CSS)?

    Example:
    ....
    myControl.CssClass = "MyCssClass";
    ....
    x = myControl.Style["font-weight"];
     
    Shane Walters, Mar 3, 2005
    #1
    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. =?Utf-8?B?a2g=?=

    DataGrid.AllowSorting and CssClass

    =?Utf-8?B?a2g=?=, Aug 2, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    1,564
    Joe Fallon
    Aug 3, 2004
  2. =?Utf-8?B?bXN1aw==?=

    CssClass and HTML file field control

    =?Utf-8?B?bXN1aw==?=, Nov 25, 2004, in forum: ASP .Net
    Replies:
    6
    Views:
    675
    =?Utf-8?B?bXN1aw==?=
    Nov 30, 2004
  3. Hardy Wang

    Assign CssClass to RadionButonList

    Hardy Wang, Jan 20, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    349
    Hardy Wang
    Jan 20, 2005
  4. =?Utf-8?B?Y2hyaXNmb3g=?=

    Problem using Webpartzone and CssClass

    =?Utf-8?B?Y2hyaXNmb3g=?=, Sep 28, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    2,555
    =?Utf-8?B?Vml0YW1pbkMubmV0?=
    Nov 18, 2005
  5. Tony

    How to read CSS styles - problem

    Tony, Dec 14, 2005, in forum: Javascript
    Replies:
    2
    Views:
    83
Loading...

Share This Page