CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old April 21st, 2004, 09:55 AM
timandkitty timandkitty is offline
saved by grace
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: kansas
Posts: 85 timandkitty User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Question CSS in ASP.NET with VB

I am looking for a way to implement CSS styles on DropDownList ListItems. In HTML it's pretty easy:

PHP Code:
<select>
<
option class="red" value"Yes">Option 1</option>
<
option class="pink" value"No">Option 2</option
</
select


But in ASP.NET-VB I'm hitting a snag.

PHP Code:
<asp:dropdownlist id="ddlList" runat="server" Width="180px">
<
asp:ListItem Value="Yes" class="red">Option1</asp:ListItem>
<
asp:ListItem Value="No" class="pink">Option2</asp:ListItem></asp:dropdownlist


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

Reply With Quote
  #2  
Old April 22nd, 2004, 08:30 PM
vbrtrmn's Avatar
vbrtrmn vbrtrmn is offline
4:04 Time Not Found
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Jan 2004
Location: Northern Virginia
Posts: 1,891 vbrtrmn User rank is First Lieutenant (10000 - 20000 Reputation Level)vbrtrmn User rank is First Lieutenant (10000 - 20000 Reputation Level)vbrtrmn User rank is First Lieutenant (10000 - 20000 Reputation Level)vbrtrmn User rank is First Lieutenant (10000 - 20000 Reputation Level)vbrtrmn User rank is First Lieutenant (10000 - 20000 Reputation Level)vbrtrmn User rank is First Lieutenant (10000 - 20000 Reputation Level)vbrtrmn User rank is First Lieutenant (10000 - 20000 Reputation Level)vbrtrmn User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Week 16 h 33 m 36 sec
Reputation Power: 177
Send a message via ICQ to vbrtrmn Send a message via AIM to vbrtrmn Send a message via MSN to vbrtrmn Send a message via Yahoo to vbrtrmn
I highly recommend you Cross Post this in ASP Programming: http://forums.devshed.com/f51/s
__________________
------------- vbrtrmn --------------
i think i'm missing some vowels here
------------------------------------
---------- js.antinoc.net ----------
------------------------------------
--- The Two Types of Programmers ---

Motorcycles are cooler than computers!

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > CSS in ASP.NET with VB


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway