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.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Rajendra DeopuraPosted Nov 14, 2008, 4:45 AM
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
Bechir BejaouiPosted Nov 14, 2008, 4:06 AM
oItem.Selected = true;
DropDownList1.Items.Add(oItem);
Qaiser MehmoodPosted Nov 14, 2008, 2:12 AM
Bechir BejaouiPosted Nov 13, 2008, 6:12 PM