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
Solved

CssClass confusion

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

Suggested Solutions

Title # Comments Views Activity
css selector 1 21
How come this regular expression allows "e"? 14 45
ASP.NET (VB) return a record 2 35
How can I make the first part identical to the second ? 1 23
CSS is a visual language used to classify objects and define rules about how they should be displayed. CSS skills aren’t restricted to developers anymore, there is a big benefit to having a basic understanding of the language, regardless of your occ…
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
In this tutorial viewers will learn how to define a gradient in CSS. Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Gradient. Define the background as "linear-gradient(to right, #ee3668, black)". Ensure you …
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…

790 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