I have dropdown list control in one of my application and when I add Items in it from database Its displaying the first Item into Dropdown list by default but I want to display someother text into this like ‘Select Item from the List’ Is there any way I can do this .
Also Can you please help me setting the same value from javascript
On the ASP.NET side of things, you can create the DropDownList with AppendDataBoundItems=’true’ and any items you bind to it will come after the default:
As for doing the same thing completely in Javascript, you can do it with a function like this:
Or with jQuery (there is probably something much cleaner, especially for creating a new option tag, but this works):