Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Re: Setting contents of style sheet at run-time

Reply
Thread Tools

Re: Setting contents of style sheet at run-time

 
 
Juno
Guest
Posts: n/a
 
      08-06-2004
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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



 
Reply With Quote
 
 
 
 
=?Utf-8?B?QmlsbCBCb3Jn?=
Guest
Posts: n/a
 
      08-06-2004
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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Content Page specific style style sheet rshillington@gmail.com ASP .Net 0 07-14-2006 03:45 PM
Firefox screwing with my style sheet margins! Bill Firefox 14 11-18-2005 03:30 PM
Need help with Style conversion from Style object to Style key/value collection. Ken Varn ASP .Net Building Controls 0 04-26-2004 07:06 PM
Adding style sheet dynamicaly Marc Nederhoff ASP .Net 2 11-05-2003 04:56 PM
Set column size with additional style sheet setting Matt ASP .Net Datagrid Control 0 07-01-2003 02:18 PM



Advertisments