473,387 Members | 1,504 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Use "Class" to display CSS data in ASP.NET

Dear all

As I know, I can use "Class" attribute in ASP to render the HTML control with some CSS properties. I want to know that is it the same effect in ASP.NET? But I found it is not.

Below is my code. Please suggest the correction, if I wrong. If not, how can i use CSS in ASP.NET

<asp:button class="btn" id="btnLogin" runat="server" Text="Login"></asp:button
Nov 18 '05 #1
2 1026

"Grey" <er*****@i-cable.com> wrote in message
news:#l**************@TK2MSFTNGP12.phx.gbl...
Dear all

As I know, I can use "Class" attribute in ASP to render the HTML control
with some CSS properties. I want to know that is it the same effect in
ASP.NET? But I found it is not.

Below is my code. Please suggest the correction, if I wrong. If not, how can
i use CSS in ASP.NET

<asp:button class="btn" id="btnLogin" runat="server"
Text="Login"></asp:button

--

Server controls have a CssClass property for that. Simply use
CssClass="btn" instead of class=
--
Rocky Moore
www.HintsAndTips.com
Nov 18 '05 #2
I hope this is not duplicated, I posted a reply but did not see it show up
while others did. So if this is a duplicate, sorry!

Server controls have a CssClass property for that. Simply use
CssClass="btn" instead of class=

--
Rocky Moore
www.HintsAndTips.com

"Grey" <er*****@i-cable.com> wrote in message
news:#l**************@TK2MSFTNGP12.phx.gbl...
Dear all

As I know, I can use "Class" attribute in ASP to render the HTML control
with some CSS properties. I want to know that is it the same effect in
ASP.NET? But I found it is not.

Below is my code. Please suggest the correction, if I wrong. If not, how can
i use CSS in ASP.NET

<asp:button class="btn" id="btnLogin" runat="server"
Text="Login"></asp:button
Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Richard Barnet | last post by:
I'm trying to style a line break, something like this: <br class="spacer" /> via CSS, but none of the following seems to have any effect. Any ideas? br.spacer { clear: both; height: 50px;...
1
by: Jonathan Wilson | last post by:
I am looking for a C++ class library that can store data in a tree. The class library needs to be: 1.Available under a licence like GPL, LGPL or BSD so I can use it in my GPL program and 2.Usable...
3
by: janek | last post by:
I have a question: what differences are between: namespace Mary { int r = 5 ; char m ;
9
by: MLH | last post by:
I need a fundamental explanation of Class Modules - something suitable for newbies. Access 2.0 didn't seem to focus on them very much. Now that I'm using Access 97, it seems they're everywhere. thx...
0
by: Kenneth Baltrinic | last post by:
Is the following code correct for serializing a quasi-single class, that is a class that has a descreet (though more than one, so not a true singleton) number of static instances and no dynamically...
9
by: Neil Kiser | last post by:
I'm trying to understand what defining a class as 'static' does for me. Here's an example, because maybe I am thinking about this all wrong: My app will allows the user to control the fonts...
3
by: Steve Richter | last post by:
here is an error I get when I open my class library project: "The class ResultsTable can be designed, but is not the first class in the file. Visual Studio requires that designers use the first...
5
by: Diffident | last post by:
Hello All, I have written a webform which is by default derived from "Page" class. I have coded another utility class with few methods and an object of this class is instantiated from the webfom...
36
by: Roedy Green | last post by:
The only browser I have encountered that supports <colgroup><col class="behold"></colgroup> to apply a CSS style to a whole column, is Microsoft Internet Explorer. I have been told it SHOULD NOT...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.