Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
| Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old August 8th, 2008, 06:55 AM
Authorized User
Join Date: Nov 2005
Location: Colombo, , Sri Lanka.
Posts: 51
Thanks: 0
Thanked 0 Times in 0 Posts
Default Dropdownlist Items Identification


Im using c# asp.net 2.0. In my website i have few asp.net dropdown controls .i want to show some items using DIFFERENT COLOUR (should highlite).
Ex- In my dropdown control items like this way.
So i want to highlite these integer values using different colour.
Are there any way to do this. Can anyone help me please do this.
Thank you all.

(Dropdownlist datasource comming from database.)
  #2 (permalink)  
Old August 18th, 2008, 12:50 PM
Friend of Wrox
Points: 4,332, Level: 27
Points: 4,332, Level: 27 Points: 4,332, Level: 27 Points: 4,332, Level: 27
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Nov 2003
Location: , NJ, USA.
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts

After the list is bound, loop through each list item and check if it is an integer, and add code something like this"
DropDownList1.Items(1).Attributes("style") = "background-color: red;"

Similar Threads
Thread Thread Starter Forum Replies Last Post
About Anonymous Identification Lee Dumond BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 15 December 14th, 2008 05:12 PM
DropDownList, DataSource and Selected Items kingroon ASP.NET 2.0 Basics 2 February 25th, 2008 10:41 AM
Finding items in a dropdownlist control johnnycorpse Classic ASP Components 0 May 18th, 2007 04:09 AM
Regarding uniquely identification of every struts vishal_java2 Struts 0 April 11th, 2006 02:42 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.