Home All Groups Group Topic Archive Search About
Author
22 Nov 2006 9:37 AM
Zile
How to add css in asp.net 2.0 aplication. On label control I have some
property named CssClass, but if I add some class name, it doesn't work. How
to add css class for label control?

Thanx

Author
22 Nov 2006 9:43 AM
Laurent Bugnion
Hi,

Zile wrote:
> How to add css in asp.net 2.0 aplication. On label control I have some
> property named CssClass, but if I add some class name, it doesn't work. How
> to add css class for label control?
>
> Thanx

Where is the CSS class defined? Setting the CssClass attribute only
copies the value to the HTML file. You must include the CSS file
yourself in the ASPX page's header (or add the <style> section).

HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
Private/Malaysia: http://mypage.bluewin.ch/lbugnion
Support children in Calcutta: http://www.calcutta-espoir.ch
Author
22 Nov 2006 1:50 PM
Cowboy (Gregory A. Beamer)
You have to also reference the CSS file. T do in a single page, drag the css
file onto the page and it will create the link. For the master page, change
the href in the created link to include a tilde (~) for root:

<link href="~/css/common.css" rel="stylesheet" type="text/css" />


--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

*************************************************
Think outside the box!
*************************************************
Show quoteHide quote
"Zile" <bozid***@yahoo.com> wrote in message
news:ek15p8$us2$1@sunce.iskon.hr...
> How to add css in asp.net 2.0 aplication. On label control I have some
> property named CssClass, but if I add some class name, it doesn't work.
> How to add css class for label control?
>
> Thanx
>