Hi Patrick,
Is it possible that your inline styles are overriding the styles in the
class? You should be able to configure it to use just styles... or link to a
stylesheet.
<%@ Page Language="VB" %>
<html>
<head>
<style>.buttonstyle {
FONT-SIZE: smaller; BORDER-LEFT-COLOR: #7da1e9; BORDER-BOTTOM-COLOR:
#7da1e9; WIDTH: 40%; COLOR: #c04000; BORDER-TOP-STYLE: inset;
BORDER-TOP-COLOR: #7da1e9; BORDER-RIGHT-STYLE: inset; BORDER-LEFT-STYLE:
inset; BACKGROUND-COLOR: silver; BORDER-RIGHT-COLOR: #7da1e9;
BORDER-BOTTOM-STYLE: inset; f: bold
}
</style>
</head>
<body>
<form runat="server">
<asp:Linkbutton id="Button1" runat="server"
CssClass="buttonstyle">Expand</asp:Linkbutton>
</form>
</body>
</html>
[quoted text, click to view] "Patrick.O.Ige" wrote:
> I have this linkbutton control
> How can i add Style sheet to the Text, button attribute.
> I know i can use CssClass but how would i define the style there to link to
> this control..
> Any ideas
> I WANT TO CHANGE THE COLOR OF A BUTTON FOR EXAMPLE AND THE FONTS!!!!
> <asp:Linkbutton id="Button1" onclick="Button1_Click" runat="server"
> Text="Expand" BorderStyle=Inset CssClass="" BorderColor=#7da1e9
> Width="40%"></asp:Linkbutton>
If you have an external css file u can just pick the class and set it in the
CSSClass property of the object. Otherwise there are some properties in
ControlAttribute property of control. Last resort (in case both the above
does not solve ur prob => ControlAttribute does not include the css prop u
wanna change), set it by Object.Styles.Add function.
HTH
Ashish
[quoted text, click to view] "Patrick.O.Ige" <PatrickOIge@discussions.microsoft.com> wrote in message
news:42497746-C506-4F1D-9D17-05AC71DDD7B5@microsoft.com...
> I have this linkbutton control
> How can i add Style sheet to the Text, button attribute.
> I know i can use CssClass but how would i define the style there to link
to
> this control..
> Any ideas
> I WANT TO CHANGE THE COLOR OF A BUTTON FOR EXAMPLE AND THE FONTS!!!!
> <asp:Linkbutton id="Button1" onclick="Button1_Click" runat="server"
> Text="Expand" BorderStyle=Inset CssClass="" BorderColor=#7da1e9
> Width="40%"></asp:Linkbutton>
>