Is there a buit-in method to parse a STYLE attribute string?

Discussion in 'ASP .Net' started by Henri, Nov 29, 2004.

  1. Henri

    Henri Guest

    Hi!

    consider this :
    <div runat="server" id="mydiv" style="color:white;width:200px;" />

    the styles contained in the style attributes are automatically parsed to the
    Style property.
    Is there a built-in method to import another string to the Style property.
    Some kind of:

    Me.Style = ParseCssText("color:white;width:200px;")

    And the same to build a css string from the Style property?

    I know it might not be very difficult to do it myself but if there's already
    a buit-in method to do that, that would stupid :)

    Thanks

    Henri
     
    Henri, Nov 29, 2004
    #1
    1. Advertising

  2. Me.mydiv.Style.Add("width","200px")
    Me.mydiv.Style.Add("color","white")

    "Henri" wrote:

    > Hi!
    >
    > consider this :
    > <div runat="server" id="mydiv" style="color:white;width:200px;" />
    >
    > the styles contained in the style attributes are automatically parsed to the
    > Style property.
    > Is there a built-in method to import another string to the Style property.
    > Some kind of:
    >
    > Me.Style = ParseCssText("color:white;width:200px;")
    >
    > And the same to build a css string from the Style property?
    >
    > I know it might not be very difficult to do it myself but if there's already
    > a buit-in method to do that, that would stupid :)
    >
    > Thanks
    >
    > Henri
    >
    >
    >
    >
    >
    >
    >
     
    =?Utf-8?B?d2VpY2h1bmcgW01DU0QsIE1DREJBXQ==?=, Nov 29, 2004
    #2
    1. Advertising

  3. Henri

    Henri Guest

    Sorry but this doesn't answer my question :)
    Thanks anyway

    "weichung [MCSD, MCDBA]" <> a
    écrit dans le message de
    news:...
    > Me.mydiv.Style.Add("width","200px")
    > Me.mydiv.Style.Add("color","white")
    >
    > "Henri" wrote:
    >
    > > Hi!
    > >
    > > consider this :
    > > <div runat="server" id="mydiv" style="color:white;width:200px;" />
    > >
    > > the styles contained in the style attributes are automatically parsed to

    the
    > > Style property.
    > > Is there a built-in method to import another string to the Style

    property.
    > > Some kind of:
    > >
    > > Me.Style = ParseCssText("color:white;width:200px;")
    > >
    > > And the same to build a css string from the Style property?
    > >
    > > I know it might not be very difficult to do it myself but if there's

    already
    > > a buit-in method to do that, that would stupid :)
    > >
    > > Thanks
    > >
    > > Henri
    > >
    > >
    > >
    > >
    > >
    > >
    > >

    >
     
    Henri, Nov 29, 2004
    #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. Replies:
    19
    Views:
    1,135
    Daniel Vallstrom
    Mar 15, 2005
  2. Replies:
    3
    Views:
    1,549
    Brandon McCombs
    May 2, 2007
  3. Replies:
    21
    Views:
    1,413
    Alex Vinokur
    Aug 18, 2007
  4. Ken Varn
    Replies:
    0
    Views:
    472
    Ken Varn
    Apr 26, 2004
  5. Free Kickr

    All the core function are buit-in?

    Free Kickr, Sep 13, 2009, in forum: Ruby
    Replies:
    6
    Views:
    96
    Through Pass
    Sep 13, 2009
Loading...

Share This Page