Solved

CssClass confusion

Posted on 2008-06-10
5
347 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
Comment Utility
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
Comment Utility
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
Comment Utility
0
 

Author Comment

by:allanmark
Comment Utility
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
Comment Utility
Many thanks!!!
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
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 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 …

771 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now