Re: Setting contents of style sheet at run-time

Discussion in 'ASP .Net' started by Juno, Aug 6, 2004.

  1. Juno

    Juno Guest

    Hi,

    Put a Literal control on the page and in codebihide :
    Literal1.Text = "<STYLE>.MyHeaderStyle { FONT-SIZE: 10pt; COLOR: black }
    </STYLE> "

    Thus ,you can modify MyHeaderStyle at the rumtime.

    --
    Juno
    MCSD.NET, MCDBA, MCSE
    ----------------------------------------------------------
    Support Team of EasyDotNet, INC. http://www.EasyDotNet.com
    DataForm.NET - The most powerful data entry web server control for ASP.NET



    "Bill Borg" <> wrote in message
    news:...
    > Hello all,
    >
    > I am using a style sheet to format html output. Is there a way to override
    > those style attributes at run-time?
    >
    > e.g. <span class=MyHeaderStyle>Some header...</span>
    >
    > I would like to pull from a database and set attributes of MyHeaderStyle

    for
    > font-size, color, etc.
    >
    > I'm thinking this is possible, but can't figure it out. Any help is
    > appreciated.
    >
    > Thanks,
    >
    > Bill Borg
     
    Juno, Aug 6, 2004
    #1
    1. Advertising

  2. Brilliant, thank you.

    "Juno" wrote:

    > Hi,
    >
    > Put a Literal control on the page and in codebihide :
    > Literal1.Text = "<STYLE>.MyHeaderStyle { FONT-SIZE: 10pt; COLOR: black }
    > </STYLE> "
    >
    > Thus ,you can modify MyHeaderStyle at the rumtime.
    >
    > --
    > Juno
    > MCSD.NET, MCDBA, MCSE
    > ----------------------------------------------------------
    > Support Team of EasyDotNet, INC. http://www.EasyDotNet.com
    > DataForm.NET - The most powerful data entry web server control for ASP.NET
    >
    >
    >
    > "Bill Borg" <> wrote in message
    > news:...
    > > Hello all,
    > >
    > > I am using a style sheet to format html output. Is there a way to override
    > > those style attributes at run-time?
    > >
    > > e.g. <span class=MyHeaderStyle>Some header...</span>
    > >
    > > I would like to pull from a database and set attributes of MyHeaderStyle

    > for
    > > font-size, color, etc.
    > >
    > > I'm thinking this is possible, but can't figure it out. Any help is
    > > appreciated.
    > >
    > > Thanks,
    > >
    > > Bill Borg

    >
    >
    >
     
    =?Utf-8?B?QmlsbCBCb3Jn?=, Aug 7, 2004
    #2
    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:
    0
    Views:
    519
  2. Radu
    Replies:
    1
    Views:
    547
    Bruce Barker
    Jan 8, 2007
  3. Pierre Yves
    Replies:
    2
    Views:
    486
    Pierre Yves
    Jan 10, 2008
  4. Ken Varn
    Replies:
    0
    Views:
    470
    Ken Varn
    Apr 26, 2004
  5. Matt

    Set column size with additional style sheet setting

    Matt, Jul 1, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    138
Loading...

Share This Page