CSS In .NET

Z

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
 
L

Laurent Bugnion

Hi,
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
 
C

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" />
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top