Geekpedia Programming Tutorials






ASP.NET DropDownList of US states

On Sunday, May 28th 2006 at 12:29 PM
By Andrew Pociu (View Profile)
*****   (Rated 5 with 4 votes)
Advertisement
More ASP.NET Resources
Below there is a list of states inside United States, each being a ListItem inside an ASP.NET DropDownList:

<asp:DropDownList id="State" 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>


Digg Digg It!     Del.icio.us Del.icio.us     Reddit Reddit     StumbleUpon StumbleIt     Newsvine Newsvine     Furl Furl     BlinkList BlinkList

Rate Rate this Knowledge Base article
Comment Current Comments
by Mike H on Tuesday, August 29th 2006 at 04:39 PM

Thanks so much. Such a major time saver. Kudos to U

by danny on Sunday, March 4th 2007 at 01:04 AM

thanks - just saved me a lot of typing!

by Bob on Sunday, June 24th 2007 at 09:12 PM

Thank you !

by mk on Friday, August 17th 2007 at 10:30 PM

Thanks

by Ben Speer on Wednesday, November 7th 2007 at 10:48 AM

Thanks buddy. I hate typing this thing out.

by Camron Lockeby on Wednesday, November 28th 2007 at 03:00 PM

I\'m repeating this I know, but you\'re a life saver!

by Rob VIgnato on Thursday, January 10th 2008 at 02:40 PM

Dude... You\'re heroic!

by Chris on Friday, February 29th 2008 at 02:07 AM

You are awesome, and i never use that word. Why doesn't VS2008 have a control for this?

by Alex on Sunday, March 16th 2008 at 02:20 PM

Definetly a time saver. Thanks.

by Adam on Monday, April 7th 2008 at 05:04 PM

Just what I was looking for. Thanks so much.

by Aaron Delwiche on Tuesday, April 15th 2008 at 02:59 PM

Thank you for taking the time to post this. :)

by kenneth on Saturday, November 15th 2008 at 08:27 PM

I guess this will work.
I was looking for an xml file that I could use to link to a dropdown list because I need to dynamically change the dropdown according to country. A quick find/replace and there is the XML.

Thanks

by jeff on Thursday, July 9th 2009 at 01:26 PM

I love you

by Jack on Tuesday, September 29th 2009 at 08:24 AM

Look at how something so simple can make us all so very happy. Seriously, it is appreciated. Thank you!

by Ben Henderson on Friday, October 16th 2009 at 06:30 PM

Cheers ;)

by Tony on Thursday, December 3rd 2009 at 04:46 PM

Thanks, huge time saver!

by Zach on Friday, January 15th 2010 at 11:21 AM

Wow, you just saved me so much hassle. Thanks!

by Scott on Monday, January 18th 2010 at 02:07 PM

Huge time saver, thank you!!!

by Coder on Monday, February 8th 2010 at 03:19 PM

awesome!


Comment Comment on this Knowledge Base article
Name: Email:
Message:
Knowledge Base Related Knowledge Base Articles
There are no related KB articles.

Comment Related Source Code
There is no related code.

Comment Related Tutorials
There are no related tutorials.

Jobs ASP.NET Job Search
My skills include:

Enter a City:

Select a State:


Advanced Search >>
Latest Tech Bargains

Advertisement

Free Magazine Subscriptions

Today's Pictures

Today's Video

Other Resources

Latest Download

Latest Icons