ASP.Net US States Dropdown List

For large projects I usually databind my dropdown lists, but sometimes you just need a no-nonsense dropdown list of US States. For all you folks Googling to save time, here’s that code. Enjoy! 🙂

<asp:DropDownList ID="DropDownListState" runat="server">
	<asp:ListItem Value="AL">Alabama</asp:ListItem>
	<asp:ListItem Value="AK">Alaska</asp:ListItem>
	<asp:ListItem Value="AZ">Arizona</asp:ListItem>
	<asp:ListItem Value="AR">Arkansas</asp:ListItem>
	<asp:ListItem Value="CA">California</asp:ListItem>
	<asp:ListItem Value="CO">Colorado</asp:ListItem>
	<asp:ListItem Value="CT">Connecticut</asp:ListItem>
	<asp:ListItem Value="DC">District of Columbia</asp:ListItem>
	<asp:ListItem Value="DE">Delaware</asp:ListItem>
	<asp:ListItem Value="FL">Florida</asp:ListItem>
	<asp:ListItem Value="GA">Georgia</asp:ListItem>
	<asp:ListItem Value="HI">Hawaii</asp:ListItem>
	<asp:ListItem Value="ID">Idaho</asp:ListItem>
	<asp:ListItem Value="IL">Illinois</asp:ListItem>
	<asp:ListItem Value="IN">Indiana</asp:ListItem>
	<asp:ListItem Value="IA">Iowa</asp:ListItem>
	<asp:ListItem Value="KS">Kansas</asp:ListItem>
	<asp:ListItem Value="KY">Kentucky</asp:ListItem>
	<asp:ListItem Value="LA">Louisiana</asp:ListItem>
	<asp:ListItem Value="ME">Maine</asp:ListItem>
	<asp:ListItem Value="MD">Maryland</asp:ListItem>
	<asp:ListItem Value="MA">Massachusetts</asp:ListItem>
	<asp:ListItem Value="MI">Michigan</asp:ListItem>
	<asp:ListItem Value="MN">Minnesota</asp:ListItem>
	<asp:ListItem Value="MS">Mississippi</asp:ListItem>
	<asp:ListItem Value="MO">Missouri</asp:ListItem>
	<asp:ListItem Value="MT">Montana</asp:ListItem>
	<asp:ListItem Value="NE">Nebraska</asp:ListItem>
	<asp:ListItem Value="NV">Nevada</asp:ListItem>
	<asp:ListItem Value="NH">New Hampshire</asp:ListItem>
	<asp:ListItem Value="NJ">New Jersey</asp:ListItem>
	<asp:ListItem Value="NM">New Mexico</asp:ListItem>
	<asp:ListItem Value="NY">New York</asp:ListItem>
	<asp:ListItem Value="NC">North Carolina</asp:ListItem>
	<asp:ListItem Value="ND">North Dakota</asp:ListItem>
	<asp:ListItem Value="OH">Ohio</asp:ListItem>
	<asp:ListItem Value="OK">Oklahoma</asp:ListItem>
	<asp:ListItem Value="OR">Oregon</asp:ListItem>
	<asp:ListItem Value="PA">Pennsylvania</asp:ListItem>
	<asp:ListItem Value="RI">Rhode Island</asp:ListItem>
	<asp:ListItem Value="SC">South Carolina</asp:ListItem>
	<asp:ListItem Value="SD">South Dakota</asp:ListItem>
	<asp:ListItem Value="TN">Tennessee</asp:ListItem>
	<asp:ListItem Value="TX">Texas</asp:ListItem>
	<asp:ListItem Value="UT">Utah</asp:ListItem>
	<asp:ListItem Value="VT">Vermont</asp:ListItem>
	<asp:ListItem Value="VA">Virginia</asp:ListItem>
	<asp:ListItem Value="WA">Washington</asp:ListItem>
	<asp:ListItem Value="WV">West Virginia</asp:ListItem>
	<asp:ListItem Value="WI">Wisconsin</asp:ListItem>
	<asp:ListItem Value="WY">Wyoming</asp:ListItem>
</asp:DropDownList>
This entry was posted in Web & Software Development and tagged , . Bookmark the permalink.

38 Responses to ASP.Net US States Dropdown List

  1. ASP.Net Developer says:

    Thanks!

  2. josh says:

    thank you. i knew someone would post this haha

  3. Aaron says:

    Thanks! You saved me time!!

  4. DaveCS says:

    Sweet! One search and bam! Thanks a million. I always loose the projects I add to by hand. You came to the rescue today! I am very tired and feeling lazy 😉

  5. Wayne John says:

    Nice, screw storing states in a DB!

  6. CBurts says:

    Thanks! I was hoping someone would be so kind:)

  7. Jesse says:

    ahhhhh thanks a mil!

  8. Brandon says:

    Thank you! From a fellow googler.

  9. pooledesign says:

    YES! hope I can return the favor sometime.

  10. venkat says:

    Thanks buddy, you just saved some db space and coding.

  11. naresh says:

    thank you very much u saved me a ton of time

  12. Imran Akram says:

    Thanks man, saved me a lot of time!

    Cheers…

  13. heba says:

    thanks alot saved me time

  14. dmeyer says:

    A true experienced developer. No frills or fluff, just save time. Thank you.

  15. raj says:

    Thanks a lot…..saved lot of time….

  16. b1naryZ3n says:

    Thanks beats typing it in =P

  17. Ala Hamad says:

    Thank you a loooooooot!

  18. John C says:

    Thanks for posting this. Saved much time.

  19. j says:

    beauty … thx for this, man!

  20. Bruce says:

    beauty … thx for this, man!

  21. Dan says:

    thanks. this saved so much time

  22. As often as this has to be done, you’d think it would merit it’s very own .Net Control 😉

    Thank you!

  23. Garrett says:

    Thanks xD
    Laziness<3

  24. tech mind says:

    again tnks but also provide the data binding drop down list

  25. Steve says:

    Awesome thanks!

  26. Dan Szabo says:

    High 5! Thanks!

  27. Pingback: ASP.net Dropdownlist US States « Dawei's space

  28. JX says:

    Thank you, this was a time saver.

  29. CC says:

    Also – Thanks, too. Saved me time!

  30. DvlprWun says:

    Here’s 31 Flavors of thank you!! Muchas Gracias.

  31. James says:

    You own man! Thanks!

  32. Daryl says:

    Muchas gracias man!

  33. jbentleyp says:

    Your the shizzle !!

  34. Jonathan says:

    Please don’t post anything like this again. Totally useless.

    Just kidding!

  35. Joel Collins says:

    don’t hate on provinces…

    Alabama
    Alaska
    American Samoa
    Arizona
    Arkansas
    California
    Colorado
    Connecticut
    Delaware
    District of Columbia
    Fed. States of Micronesia
    Florida
    Georgia
    Guam
    Hawaii
    Idaho
    Illinois
    Indiana
    Iowa
    Kansas
    Kentucky
    Louisiana
    Maine
    Marshall Islands
    Maryland
    Massachusetts
    Michigan
    Minnesota
    Mississippi
    Missouri
    Montana
    Nebraska
    Nevada
    New Hampshire
    New Jersey
    New Mexico
    New York
    North Carolina
    North Dakota
    Northern Mariana Is.
    Ohio
    Oklahoma
    Oregon
    Palau
    Pennsylvania
    Puerto Rico
    Rhode Island
    South Carolina
    South Dakota
    Tennessee
    Texas
    Utah
    Vermont
    Virginia
    Virgin Islands
    Washington
    West Virginia
    Wisconsin
    Wyoming

  36. Pablo says:

    Awesome man, thanks a lot!!!

  37. Doug says:

    Dude you rock! Thanks for putting this out there.

Leave a Reply

Your email address will not be published. Required fields are marked *