Solved

CssClass confusion

Posted on 2008-06-10
5
356 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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

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.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this Micro Tutorial users will learn how to embed custom fonts into websites using @font-face in CSS Select a font: Ensure the EULA allows you to use @font-face: Download the font: Get the browser-compatible files you need: Edit your CSS       - Name …
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…
Suggested Courses

615 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