Click here to Skip to main content
15,886,639 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello All,
I have a Dropdown which is binded to object data source .Now I want that when application run the Dropdown firstly show "select" in it.


Thanks With Regards,
Amit
Posted

After databinding simple add this line

C#
DropDown1.Items.Insert(0, "Select");
DropDown1.SelectedIndex = 0;
 
Share this answer
 
Comments
Shahriar Iqbal Chowdhury/Galib 2-Jul-10 15:44pm    
Reason for my vote of 4
right tip
Change your datasource query to include a "select" option in it.

for e.g.
select "select", null<br />
UNION<br />
select [col1], [col2]
 
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