I have a dropdown list with ms access datasource it show directly the selected item in dropdown list but i want to add
.....Please Select .....at the top of dropdown list items then data base values so that i can select these values.
I have a dropdown list with ms access datasource it show directly the selected item in dropdown list but i want to add
.....Please Select .....at the top of dropdown list items then data base values so that i can select these values.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Bechir BejaouiRank #144 · 15.9K reputationPosted Nov 13, 2008, 1:12 PM EST
Qaiser Mehmood55 reputationPosted Nov 13, 2008, 9:12 PM EST
Bechir BejaouiRank #144 · 15.9K reputationPosted Nov 13, 2008, 11:06 PM EST
oItem.Selected = true;
DropDownList1.Items.Add(oItem);
Rajendra Deopura139 reputationPosted Nov 13, 2008, 11:45 PM EST
Follow the instructions to add an option --Select a Country-- in Dropdownlist.
Step1.
1. Click on the smart tag of DropDownList and choose the option Edit Items.
2. A ListItem Collection Editor Opens. Click on Add Button.
3. Type --Select a country -- in Text property and -1 to Value property.
4. Click OK button to dismiss the editor.
5. Right click on Dropdownlist box and choose Properties.
7. Set AppendDataBoundItems property to true.
Now it will solve your problem.
Thanks
Happy Coding