Solved

CssClass confusion

Posted on 2008-06-10
5
353 Views
Last Modified: 2012-08-13
Greetings all

I am trying to understand ..

1.  What is the difference between the CLASS property of HTML controls and the CSSCLASS property of
     ASP.Net controls? If I create a class in my CSS file can I say "<ASPxxxxx CssClass="myClass" ?

2. When trying to set up classes for ASP controls (I am using the VS005 CSS editor (right-click on solution
    explorer... Add new item ... Select CSS Style sheet) there are properties which aren't supported (eg. if
    I try set up the "PasswordLabelText" property of the login control or, "ImageUrl" of the ASP HyperLink. I
   get  told "'PasswordLabelText' is not  a  known CSS property name."). Why is this? Do I code these
   inline (horrid! I will have to do that in more  than one place, which is why I wanted to use a class).

In advance, thanks!!

  allanmark
0
Comment
Question by:allanmark
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 8

Accepted Solution

by:
MrAgile earned 125 total points
ID: 21757478
HI There,

>> 1.  What is the difference between the CLASS property of HTML controls and the CSSCLASS property of
     ASP.Net controls? If I create a class in my CSS file can I say "<ASPxxxxx CssClass="myClass" ?

1. They are in effect the same. Think of them as attributes to a node class="myclassname" or cssclass="myclassname"

>> 
     ASP.Net controls? If I create a class in my CSS file can I say "<ASPxxxxx CssClass="myClass" ?

No. You can:

1. create an external css file and then have a class in it that is referenced by the control's css class property.
2. you can create themes which enable you to apply the css on a global level.


>> 2. When trying to set up classes for ASP controls (I am using the VS005 CSS editor (right-click on solution
    explorer... Add new item ... Select CSS Style sheet) there are properties which aren't supported (eg. if
    I try set up the "PasswordLabelText" property of the login control or, "ImageUrl" of the ASP HyperLink. I
   get  told "'PasswordLabelText' is not  a  known CSS property name."). Why is this? Do I code these
   inline (horrid! I will have to do that in more  than one place, which is why I wanted to use a class).

use one of the methods I have described above.

Sean

0
 
LVL 10

Assisted Solution

by:digitalZo
digitalZo earned 125 total points
ID: 21757484
1) No difference.

2) Go through this tutorial on how to do it: http://www.beansoftware.com/ASP.NET-Tutorials/CSS-ASP.NET.aspx

if you have any questions, please do not hesitate to ask.
0
 
LVL 10

Assisted Solution

by:digitalZo
digitalZo earned 125 total points
ID: 21757492
0
 

Author Comment

by:allanmark
ID: 21757586
DigitalZo -- Thanks for the info.  Will go through the Tuts this afternoon and post back.

MrAgile --  hope this isn't too much of a dumb question (which probably means that it is) -- by external, do you mean create something like a textfile (eg with NotePad) and then link that to my application?

Tks!
0
 

Author Closing Comment

by:allanmark
ID: 31466039
Many thanks!!!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a how to build your own CSS3 slideshow and when I say CSS3 I mean just CSS with no javascript in sight! There a few examples online of how to do this but most just show you an example without any explanation, others make it more complicat…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question