Help!!!!! Changing the background color of dropdownlist in the aspx.cs
-
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
-
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
use the ddl properties in the main code to change the back or fore color of the ddl. use properties like dropdownlist.backcolor.green and dropdownlist.forecolor.black when u have the cities active. by enclosing the statements in a if condition. if active =1 then dropdownlist.backcolor.green dropdownlist.forecolor.black end if
-
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
Hi, I am sorry to say this, but there is a bug in the rendering attributes in the dropdownlist. see: http://support.microsoft.com/default.aspx?scid=kb;en-us;Q309338[^] /Mattias