Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Adding Back Ground Color To DropDownList Items In The aspx.cs Page

Adding Back Ground Color To DropDownList Items In The aspx.cs Page

Scheduled Pinned Locked Moved ASP.NET
databasequestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jinnyb
    wrote on last edited by
    #1

    I have a dropdownlist box which displays the status of the Cities whether it is active or inactive .I want to change the background color of the selected item ,say if it is active then the back color should be green and fore-color black.When the status is inactive the back color should be red and fore-color should be black .By the way to make it very specific i am not fill the dropdownlist from database i m filling it manually uisng items.add method in the aspx.cs page . Kindly tell me how can i add color to the items of my dropdownlist Patel Neelesh A

    A 1 Reply Last reply
    0
    • J jinnyb

      I have a dropdownlist box which displays the status of the Cities whether it is active or inactive .I want to change the background color of the selected item ,say if it is active then the back color should be green and fore-color black.When the status is inactive the back color should be red and fore-color should be black .By the way to make it very specific i am not fill the dropdownlist from database i m filling it manually uisng items.add method in the aspx.cs page . Kindly tell me how can i add color to the items of my dropdownlist Patel Neelesh A

      A Offline
      A Offline
      Anonymous
      wrote on last edited by
      #2

      http://support.microsoft.com/default.aspx?scid=kb;en-us;Q309338[^]

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups