Click here to Skip to main content
15,894,460 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear Friends,


Is there any possible to set watermarkcontrol for dropdownlist? If possible please help me.

Thank you.
Posted

There is no direct way for doing this we can make this by some css tricks



function ddlinitial(ddl) {
if (ddl.selectedIndex == 0) {
ddl.style.backgroundColor = 'Blue';
ddl.options[0].innerText = 'Please select...';
} else {
ddl.style.backgroundColor = '';
ddl.options[0].innerText = '';
}
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900