473,668 Members | 2,491 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Class not working for linkbutton

I have a page where I want to set my linkbutton text using a class and
cannot seem to get it to work using CSSClass, but it works fine using
"ForeColor" .

Why is that?

Here is the code:
*************** *************** *************** *****
<%@ Page Language="VB" trace="false" debug="true" ContentType="te xt/html"
ResponseEncodin g="iso-8859-1" %>
<Script runat="server">
sub newLogonClick(s ender as Object,e as EventArgs)

end sub
</Script>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Logon</title>
</head>
<style type="text/css">
..linkButton a:visited {color:#00FF33; font-weight:bold;
}
..linkButton a:link {color:#00FF33; font-weight:bold;
}
..linkButton a:active {color:#00FF33; font-weight:bold;
}
</style>
<body>
<!-- Content Starts Here -->
<form id="Form1" runat="server">
<asp:LinkButt on id="newLogon" CSSClass="linkB utton" onClick="newLog onClick"
Text="Register Now" runat="server" /><br>
<asp:LinkButt on id="newLogon2" ForeColor="#00F F33" onClick="newLog onClick"
Text="Register Later" runat="server" />
</form>
</body>
</html>
*************** *************** *************** *************** *************** ************

I am just setting 2 links, one set with a class and one set directly.

MS says you can using CSSClass, but it doesn't seem to work.

Thanks,

Tom
Nov 19 '05 #1
3 6200
Tom..

<asp:LinkButt on id="newLogon" CSSClass="linkB utton"
onClick="newLog onClick"
Text="Register Now" runat="server" /><br>

Your LinkButton above should work for you!

How are you creating your Style sheet for linkbutton?

<style>
..linkbutton { FONT-WEIGHT: bold; FONT-SIZE: 7pt; TEXT-TRANSFORM:
capitalize; COLOR: white; FONT-FAMILY: Verdana; BACKGROUND-COLOR:
#7da1e9 }
</style>

Try using that and see if it works!

Hope it helps
Patrick

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 19 '05 #2
I had to stare at this for a second. Your asp is fine....the style is
messed up :-)

a.linkButton:vi sited {color:#00FF33; font-weight:bold;
}
a.linkButton:li nk {color:#00FF33; font-weight:bold;
}
a.linkButton:ac tive {color:#00FF33; font-weight:bold;
}
"tshad" <ts**********@f tsolutions.com> wrote in message
news:uY******** *****@TK2MSFTNG P09.phx.gbl...
I have a page where I want to set my linkbutton text using a class and
cannot seem to get it to work using CSSClass, but it works fine using
"ForeColor" .

Why is that?

Here is the code:
*************** *************** *************** *****
<%@ Page Language="VB" trace="false" debug="true" ContentType="te xt/html"
ResponseEncodin g="iso-8859-1" %>
<Script runat="server">
sub newLogonClick(s ender as Object,e as EventArgs)

end sub
</Script>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Logon</title>
</head>
<style type="text/css">
.linkButton a:visited {color:#00FF33; font-weight:bold;
}
.linkButton a:link {color:#00FF33; font-weight:bold;
}
.linkButton a:active {color:#00FF33; font-weight:bold;
}
</style>
<body>
<!-- Content Starts Here -->
<form id="Form1" runat="server">
<asp:LinkButt on id="newLogon" CSSClass="linkB utton" onClick="newLog onClick" Text="Register Now" runat="server" /><br>
<asp:LinkButt on id="newLogon2" ForeColor="#00F F33" onClick="newLog onClick" Text="Register Later" runat="server" />
</form>
</body>
</html>
*************** *************** *************** *************** *************** *
***********
I am just setting 2 links, one set with a class and one set directly.

MS says you can using CSSClass, but it doesn't seem to work.

Thanks,

Tom

Nov 19 '05 #3
"David Jessee" <dj*****@housto n.rr.com> wrote in message
news:ut******** ******@tk2msftn gp13.phx.gbl...
I had to stare at this for a second. Your asp is fine....the style is
messed up :-)

a.linkButton:vi sited {color:#00FF33; font-weight:bold;
}
a.linkButton:li nk {color:#00FF33; font-weight:bold;
}
a.linkButton:ac tive {color:#00FF33; font-weight:bold;
}
That seems to be it.

I don't know why I thought the other format would work. I saw it somewhere.

Thanks,

Tom

"tshad" <ts**********@f tsolutions.com> wrote in message
news:uY******** *****@TK2MSFTNG P09.phx.gbl...
I have a page where I want to set my linkbutton text using a class and
cannot seem to get it to work using CSSClass, but it works fine using
"ForeColor" .

Why is that?

Here is the code:
*************** *************** *************** *****
<%@ Page Language="VB" trace="false" debug="true" ContentType="te xt/html"
ResponseEncodin g="iso-8859-1" %>
<Script runat="server">
sub newLogonClick(s ender as Object,e as EventArgs)

end sub
</Script>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Logon</title>
</head>
<style type="text/css">
.linkButton a:visited {color:#00FF33; font-weight:bold;
}
.linkButton a:link {color:#00FF33; font-weight:bold;
}
.linkButton a:active {color:#00FF33; font-weight:bold;
}
</style>
<body>
<!-- Content Starts Here -->
<form id="Form1" runat="server">
<asp:LinkButt on id="newLogon" CSSClass="linkB utton"

onClick="newLog onClick"
Text="Register Now" runat="server" /><br>
<asp:LinkButt on id="newLogon2" ForeColor="#00F F33"

onClick="newLog onClick"
Text="Register Later" runat="server" />
</form>
</body>
</html>

*************** *************** *************** *************** *************** *
***********

I am just setting 2 links, one set with a class and one set directly.

MS says you can using CSSClass, but it doesn't seem to work.

Thanks,

Tom


Nov 19 '05 #4

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

Similar topics

0
1454
by: Robert Harty | last post by:
Hello all, I have a strange problem with a HtmlTable control, which is dynamically created based on the results of a query. Each row in the table has a LinkButton added to it. When I create the LinkButton I also create a new Command event and set the command argument to the primary key of the row in the database. I want every link button I create to fire the same event, but I just need the CommandArgument to be different:
0
904
by: ElanKathir | last post by:
Hi All ! Here by attached two type's of Code, One -> ASP Controls Tag Code Another -> Server side Script of the page. The Server Side Script have Two Class
3
2687
by: tshad | last post by:
I have the following: <tr valign="baseline"> <td align="center" width="103" colspan=2 nowrap> <asp:Button ID="ViewPositions" runat="server" Text="View Positions" OnClick="ViewPositions_Click" /> <asp:LinkButton text="Advanced" onClick="Advanced_Click" runat="server"/> </td> </tr>
5
3050
by: tshad | last post by:
I have been working with setting my drop boxes to allow double clicking to select an item. It worked fine until I made some changes. I then stripped the page down to the bare essentials to find out why it quit working. I found that if I didn't have a linkbutton, it quit working????????? If I changed the linkbutton to a regular button, it quit working. Here is the page:
6
14448
by: Mark Olbert | last post by:
The doPostBack javascript functioning is not submitting the page when called by linkbuttons (or an autopostback checkbox, for that matter). I'm aware of a problem with Netscape browsers and the postback code, but I have a workaround for that installed (and it looks like the code generated by ASP.NET when it renders the page does the same thing, namely, setting document<). However, the problem still exists under firefox. Has anyone come...
9
2687
by: Max Weebler | last post by:
Hi, I have a datagrid built that has an alternating item style that sets the backcolor and ForeColor of its rows. I have 4 template columns. One of them has a LinkButton embedded in it to perform updates. All the styles that are set are being followed by all templated columns with the exception for the update column. The update column does set the BackColor appropriately but when setting its ForeColor the LinkButton's color is blue and...
3
7009
by: John | last post by:
Hi I have been trying to change the css class of a linkbutton without succes ( I dont want to change the cssclass property). Maybe somebody knowshow to do this?? th.John <%@ Page Language="VB" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
1666
by: tshad | last post by:
I am having a problem with my Datagrid that displays my Files via GetFiles() If I use a HyperLinkColumn - I can use the column name "Name" which is what the result from GetFiles(). ******************************************************** Sub GetFileList() Dim dirInfo as DirectoryInfo = new DirectoryInfo(Server.MapPath("/uploads/"))
15
2058
by: Nathan Sokalski | last post by:
I have a section of my code that dynamically creates LinkButtons to allow the user to go to the page containing a question they have not answered. The code that creates the LinkButton is called, as well as the AddHandler line (I ran a Debug and saw that it executes this code, and the links are displayed on the page afterwards). However, the eventhandler is not called when the LinkButton is clicked. Here is the code that dynamically...
0
8893
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8799
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8586
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7401
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6209
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4205
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2792
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2026
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1786
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.