Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Additive HtmlTextWriteStyle

Reply
Thread Tools

Additive HtmlTextWriteStyle

 
 
Joris van Lier
Guest
Posts: n/a
 
      05-28-2008
I'm looking to add Additive Styles to a CssStyleCollection, however the
Add(HtmlTextWriteStyle, String) method seems to replace styles (see example
below).
void Style(CssStyleCollection styles)
{
styles.Add(HtmlTextWriterStyle.FontStyle, "italic");
styles.Add(HtmlTextWriterStyle.FontStyle, "bold");
// now expecting Italic + Bold
// however styles.Value == "font-style:bold;"
}

How do I assign styles in an additive way?


Thanks

Joris

 
Reply With Quote
 
 
 
 
Joris van Lier
Guest
Posts: n/a
 
      05-28-2008
"Joris van Lier" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
Nevermind, just had my afternoon-dip....

> styles.Add(HtmlTextWriterStyle.FontStyle, "bold");


should be

styles.Add(HtmlTextWriterStyle.FontWeight, "bold");


 
Reply With Quote
 
 
 
 
Munna
Guest
Posts: n/a
 
      05-28-2008


Hi

First of all you are trying to add multiple style with same key...
that is HtmlTextWriterStyle.FontStyle
if you want to use bold as style try
"HtmlTextWriterStyle.FontWeight" enum value...

Thanks & best of luck

Munna

www.munna.shatkotha.com

 
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
additive white gaussian noise Mesvak C++ 1 08-27-2008 05:20 PM
Additive parsing? (for want of a better subject) Chris Vendel XML 5 06-04-2004 02:38 PM
Additive parsing? (for want of a better subject) Chris Vendel XML 0 06-03-2004 03:51 PM



Advertisments