|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I am looking for a way to implement CSS styles on DropDownList ListItems. In HTML it's pretty easy:
PHP Code:
But in ASP.NET-VB I'm hitting a snag. PHP Code:
That code doesn't work. When compiled, it totally deletes the "class" attribute. Any thoughts?
__________________
I am the way, the truth, and the life: no man cometh unto the Father, but by me. John 14:6 |
|
#2
|
||||
|
||||
|
hi timandkitty,
i'm only getting to grips with this .net lark myself and formatting has already caused many headaches! but i have come across this. there is a known bug with the dropdownlist web control which prevents you froma dding attributes to it http://support.microsoft.com/defaul...b;en-us;Q309338 - very handy! but then this is microsoft ![]() they suggest you use a html control instead - i.e. just add the runat="server" to your bog standard select tag - will this let you do what you want? you can still dynamically load this list from a database etc and set the styles at runtime too... |
|
#3
|
|||
|
|||
|
I don't believe that isea will work for me, as I need them to maintain state through postbacks (which they won't, right?) but thanks for the information. At least I can resign myself to dysfunctionality of style for the time-being.
|
|
#4
|
||||
|
||||
|
well like i say i'm new to this stuff... but on doing a quick test the select seemed to remember everything about itself post after post for me??
|
|
#5
|
|||
|
|||
|
cool
I'll try it out. Thanks mucho, Leprechan Amigo.
|
![]() |
| Viewing: Dev Shed Forums > Web Design > CSS Help > VB: CSS Styles on ddl listitems |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|