473,409 Members | 2,004 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,409 software developers and data experts.

asp:LinkButton and CssClass

I have an asp linkbutton declared as follows:
<asp:LinkButton ID="LinkButton1" runat="server" CssClass="tt">ASP Link
Button</asp:LinkButton>

My CSS classes are declared as follows:
a.tt
{
color:Black;
text-decoration: none;
border-bottom: 1px dashed Blue;
}
a.tt:visited {
color: Black;
}

a.tt:hover
{
background:#F0F8FF;
color:Black;
cursor:help;
}

But when I run the page, none of the a.tt styles are being displayed. The
strange thing is, when I add a regular html <acontrol on the page, it works
fine.
Aug 25 '08 #1
2 4404
that's odd - I just created a page with just the link button, copied from
your code below, and added a stylesheet with your css code - -
It seemed to work just fine - - at least the main class - - since I have no
code for it to go anywhere, I can't verify the 'visited' css
David Wier
http://aspnet101.com
http://iWritePro.com - One click PDF, convert .doc/.rtf/.txt to HTML with no
bloated markup
http://cg.augustwind.com - ControlGrouper (new ASP.Net control) - control
multiple controls at one time.
"Alex" <al*******@hotmail.com.(donotspam)wrote in message
news:6E**********************************@microsof t.com...
>I have an asp linkbutton declared as follows:
<asp:LinkButton ID="LinkButton1" runat="server" CssClass="tt">ASP Link
Button</asp:LinkButton>

My CSS classes are declared as follows:
a.tt
{
color:Black;
text-decoration: none;
border-bottom: 1px dashed Blue;
}
a.tt:visited {
color: Black;
}

a.tt:hover
{
background:#F0F8FF;
color:Black;
cursor:help;
}

But when I run the page, none of the a.tt styles are being displayed. The
strange thing is, when I add a regular html <acontrol on the page, it
works
fine.

Aug 25 '08 #2
You're right. The code would have worked. I took a look at my aspx code and I
noticed I didn't have a close ">" in the DOCTYPE declaration. It's all good
now.

This is so strange. It's a very big page, with tabs and grids and every
control you can think of, and the only one that didn't work was the link
button....

"David Wier" wrote:
that's odd - I just created a page with just the link button, copied from
your code below, and added a stylesheet with your css code - -
It seemed to work just fine - - at least the main class - - since I have no
code for it to go anywhere, I can't verify the 'visited' css
David Wier
http://aspnet101.com
http://iWritePro.com - One click PDF, convert .doc/.rtf/.txt to HTML with no
bloated markup
http://cg.augustwind.com - ControlGrouper (new ASP.Net control) - control
multiple controls at one time.
"Alex" <al*******@hotmail.com.(donotspam)wrote in message
news:6E**********************************@microsof t.com...
I have an asp linkbutton declared as follows:
<asp:LinkButton ID="LinkButton1" runat="server" CssClass="tt">ASP Link
Button</asp:LinkButton>

My CSS classes are declared as follows:
a.tt
{
color:Black;
text-decoration: none;
border-bottom: 1px dashed Blue;
}
a.tt:visited {
color: Black;
}

a.tt:hover
{
background:#F0F8FF;
color:Black;
cursor:help;
}

But when I run the page, none of the a.tt styles are being displayed. The
strange thing is, when I add a regular html <acontrol on the page, it
works
fine.


Aug 26 '08 #3

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

Similar topics

17
by: Fresh Air Rider | last post by:
Hello Could anyone please explain how I can pass more than one arguement/parameter value to a function using <asp:linkbutton> or is this a major shortfall of the language ? Consider the...
5
by: Fresh Air Rider | last post by:
Hello Could anyone please explain how I can pass more than one arguement/parameter value to a function using <asp:linkbutton> or is this a major shortfall of the language ? Consider the...
27
by: Fresh Air Rider | last post by:
Hello Could anyone please explain how I can pass more than one arguement/parameter value to a function using <asp:linkbutton> or is this a major shortfall of the language ? Consider the...
2
by: dddan | last post by:
Here's my code: <asp:LinkButton OnClick="DeleteFile" OnClientClick="if (!confirm ('Are you certain you want to delete this file?') ) return false;" runat="server" ID="DeleteButton">DELETE...
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: 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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.