A step by step tutorial teaching you how to create your own chat client and chat server easily in C#, for local networks or the Internet.
A C# tutorial showing you how to make use of WMI to extract information on disk drives, such as model, capacity, sectors and serial number.
This tutorial will teach you how to calculate the shipping cost based on the weight, height, length and depth of the box, the distance and the UPS service type.
Creating a Rich Text Editor using JavaScript is easier to do than you might think, thanks to the support of modern browsers; this tutorial will walk you through it.
ASP.NET DropDownList of US states |
On Sunday, May 28th 2006 at 12:29 PM By Andrew Pociu (View Profile) ![]() ![]() ![]() ![]() (Rated 4.8 with 6 votes) |
||
|
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 It!
Del.icio.us
Reddit
StumbleIt
Newsvine
Furl
BlinkList
|
|||
|
|||
Current CommentsThanks so much. Such a major time saver. Kudos to U
thanks - just saved me a lot of typing!
Thank you !
Thanks
Thanks buddy. I hate typing this thing out.
I\'m repeating this I know, but you\'re a life saver!
Dude... You\'re heroic!
You are awesome, and i never use that word. Why doesn't VS2008 have a control for this?
Definetly a time saver. Thanks.
Just what I was looking for. Thanks so much.
Thank you for taking the time to post this. :)
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
I love you
Look at how something so simple can make us all so very happy. Seriously, it is appreciated. Thank you!
Cheers ;)
Thanks, huge time saver!
Wow, you just saved me so much hassle. Thanks!
Huge time saver, thank you!!!
awesome!
Thanks!
Thank you.....
Indeed its awesome help. However I would like to ask if you could tell me how to populate city drowndown based on the selected state from this list? For instance if I am posting a job I should pick a state and a city the job is located. How do I write a control to do this?
thanks
Related Knowledge Base Articles
Related Source Code
Related Tutorials
ASP.NET Job Search