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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top