Click here to Skip to main content
14,969,978 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to bind dropdownlist with alphabetic ??


[edit]SHOUTING removed - OriginalGriff[/edit]
Posted
Updated 15-Mar-13 23:15pm
v2
Comments
Shubham Choudhary 16-Mar-13 5:03am
   
can you describe your question!!!!!
OriginalGriff 16-Mar-13 5:16am
   
DON'T SHOUT. Using all capitals is considered shouting on the internet, and rude (using all lower case is considered childish). Use proper capitalisation if you want to be taken seriously.

And to add to that:
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind.
Use the "Improve question" widget to edit your question and provide better information.
Sandeep Mewara 16-Mar-13 5:23am
   
This is not a well framed question! We cannot work out what you are trying to do/ask from the post. Please elaborate and be specific.
Use the "Improve question" link to edit your question and provide better information.
P A N K A J 16-Mar-13 11:51am
   
Please explain you question.
Are you want to add items in dropdownlist in alphabetic order or wants to add alphabets?
Chinmaya C 16-Mar-13 13:18pm
   
I guess the question is about displaying the dropdown list in alphabetic manner (sorted order).

If this is the requirement then you can apply sorting on data source...

List<string> list = .....; // logic to get the list of data to display
list.Sort((a, b) => string.Compare(a, b));
DropDown1.DataSource = list;
DropDown1.DataBind();

Hope this helps...

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