|
 |
aspx thread: Setting backcolor on asp:linkbutton
Message #1 by "J Donahue" <jdonahue@f...> on Wed, 12 Jun 2002 02:51:53
|
|
I have a linkbutton declared as:
<asp:linkbutton ID="PersonalInfoTab" OnClick="PersonalInfo"
Runat="server" Text="Personal Information" />
How do I set the backcolor for an asp:linkbutton on the server side? It
doesn't like "PersonalInfoTab.Backcolor="#000099"?
Thanks!!
Message #2 by "Dave Rezoski" <daverezoski@h...> on Wed, 12 Jun 2002 04:11:29 +0000
|
|
this works for me:
<asp:LinkButton BackColor=red Runat=server ID=lbLinkButton>Click
here!</asp:LinkButton>
and you can set it programmatically like so: (vb)
lbLinkButton.BackColor = System.Drawing.Color.Blue
however, I'm not sure how you'd assign a custom color, such as #000099
----Original Message Follows----
From: "J Donahue" <jdonahue@f...>
Reply-To: "ASP+" <aspx@p...>
To: "ASP+" <aspx@p...>
Subject: [aspx] Setting backcolor on asp:linkbutton
Date: Wed, 12 Jun 2002 02:51:53
I have a linkbutton declared as:
<asp:linkbutton ID="PersonalInfoTab" OnClick="PersonalInfo"
Runat="server" Text="Personal Information" />
How do I set the backcolor for an asp:linkbutton on the server side? It
doesn't like "PersonalInfoTab.Backcolor="#000099"?
Thanks!!
_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx
Message #3 by =?ks_c_5601-1987?B?wMy1v7n8?= <funnyfox@d...> on Wed, 12 Jun 2002 13:15:17 +0900
|
|
Just try this method
System.Drawing.Color.FromArgb(Red, Green, Blue)
Good luck!
-----Original Message-----
From: Dave Rezoski [mailto:daverezoski@h...]
Sent: Wednesday, June 12, 2002 1:11 PM
To: ASP+
Subject: [aspx] Re: Setting backcolor on asp:linkbutton
this works for me:
<asp:LinkButton BackColor=3Dred Runat=3Dserver ID=3DlbLinkButton>Click
here!</asp:LinkButton>
and you can set it programmatically like so: (vb)
lbLinkButton.BackColor =3D System.Drawing.Color.Blue
however, I'm not sure how you'd assign a custom color, such as #000099
----Original Message Follows----
From: "J Donahue" <jdonahue@f...>
Reply-To: "ASP+" <aspx@p...>
To: "ASP+" <aspx@p...>
Subject: [aspx] Setting backcolor on asp:linkbutton
Date: Wed, 12 Jun 2002 02:51:53
I have a linkbutton declared as:
<asp:linkbutton ID=3D"PersonalInfoTab" OnClick=3D"PersonalInfo"
Runat=3D"server" Text=3D"Personal Information" />
How do I set the backcolor for an asp:linkbutton on the server side? It
doesn't like "PersonalInfoTab.Backcolor=3D"#000099"?
Thanks!!
_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx
Message #4 by "J Donahue" <jdonahue@f...> on Wed, 12 Jun 2002 16:49:34
|
|
Thanks all!! The following works:
PersonalInfoTab.BackColor = System.Drawing.ColorTranslator.FromHtml
("#000099");
> I have a linkbutton declared as:
<> asp:linkbutton ID="PersonalInfoTab" OnClick="PersonalInfo"
R> unat="server" Text="Personal Information" />
> How do I set the backcolor for an asp:linkbutton on the server side?
It
d> oesn't like "PersonalInfoTab.Backcolor="#000099"?
> Thanks!!
|
|
 |