Click here to Skip to main content
15,922,584 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have month list in dropdownlist like jan ,feb,mar....i want find month number of month name selectioin .plz help me?
Posted

1 solution

Give dropdownlist value as the months number and display text the name of the month and onselectedindexchange event get drpdwnlist.selectedvalue.
 
Share this answer
 
Comments
Neema Derakhshan 22-Aug-13 2:31am    
also if you need your months names as selectedValue,you can use a switch case for 12 months to find months numbers.

switch (dropDownList.SelectedValue)
{
case "Jan":
return 1;
...

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