Applying CSS Styles to Dropdownlist


G

Guest

Is there a problem with asp.net 2 when setting the Csstyle. I have a CSS
stylesheet and can format different elements, but having trouble formatting
the asp.net controls , such as dropdownlist.

Thanks

Neil
 
Ad

Advertisements

J

Juan T. Llibre

<script language="VB" runat="server">
Sub Page_Load(ByVal Src As Object, ByVal E As EventArgs)
Dim MyStyle As New Style
MyStyle.BackColor = Drawing.Color.Aqua
DropDownList1.ApplyStyle(MyStyle)
End Sub
</script>

Not all properties can be changed, though.

Also, see the source code for a custom web control written by Fabrice Marguerie :
http://weblogs.asp.net/fmarguerie/archive/2003/02/27/3103.aspx
 
J

Juan T. Llibre

<script language="VB" runat="server">
Sub Page_Load(ByVal Src As Object, ByVal E As EventArgs)
Dim MyStyle As New Style
MyStyle.BackColor = Drawing.Color.Aqua
DropDownList1.ApplyStyle(MyStyle)
End Sub
</script>

Not all properties can be changed, though.

Also, see the source code for a custom web control written by Fabrice Marguerie :
http://weblogs.asp.net/fmarguerie/archive/2003/02/27/3103.aspx
 
J

Juan T. Llibre

<script language="VB" runat="server">
Sub Page_Load(ByVal Src As Object, ByVal E As EventArgs)
Dim MyStyle As New Style
MyStyle.BackColor = Drawing.Color.Aqua
DropDownList1.ApplyStyle(MyStyle)
End Sub
</script>

Not all properties can be changed, though.

Also, see the source code for a custom web control written by Fabrice Marguerie :
http://weblogs.asp.net/fmarguerie/archive/2003/02/27/3103.aspx
 
Ad

Advertisements


Top