It seems like every web project we develop requires the use of a States DropDownList.  Rather than manually binding an <asp:dropdownlist /> with individual <asp:ListItem /> tags, we use a database table of all US States containing both the state name, and the state abbreviation. We can then run a "Select All" query on this table and bind the results to the States drop down list.

Here's the creation script for the database table:

CREATE TABLE [dbo].[US_States](
    [StateID] [int] IDENTITY(1,1) NOT NULL,
    [StateName] [varchar](100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
    [StateAbbreviation] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
 CONSTRAINT [PK_US_States] PRIMARY KEY CLUSTERED 
(
    [StateID] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO

This creates a database table named US_States with three fields: StateID (auto-incremented primary key), StateName (the full state name spelled out), StateAbbreviation (the two character state code).

Next we need to fill the table with all the US States. Here's the script:

insert into US_States (StateName,StateAbbreviation) values ('ALABAMA','AL');
insert into US_States (StateName,StateAbbreviation) values ('ALASKA ','AK');
insert into US_States (StateName,StateAbbreviation) values ('ARIZONA','AZ');
insert into US_States (StateName,StateAbbreviation) values ('ARKANSAS','AR');
insert into US_States (StateName,StateAbbreviation) values ('CALIFORNIA','CA');
insert into US_States (StateName,StateAbbreviation) values ('COLORADO','CO');
insert into US_States (StateName,StateAbbreviation) values ('CONNECTICUT','CT');
insert into US_States (StateName,StateAbbreviation) values ('DELAWARE','DE');
insert into US_States (StateName,StateAbbreviation) values ('DISTRICT OF COLUMBIA','DC');
insert into US_States (StateName,StateAbbreviation) values ('FLORIDA','FL');
insert into US_States (StateName,StateAbbreviation) values ('GEORGIA','GA');
insert into US_States (StateName,StateAbbreviation) values ('HAWAII ','HI');
insert into US_States (StateName,StateAbbreviation) values ('IDAHO','ID');
insert into US_States (StateName,StateAbbreviation) values ('ILLINOIS','IL');
insert into US_States (StateName,StateAbbreviation) values ('INDIANA','IN');
insert into US_States (StateName,StateAbbreviation) values ('IOWA','IA');
insert into US_States (StateName,StateAbbreviation) values ('KANSAS','KS');
insert into US_States (StateName,StateAbbreviation) values ('KENTUCKY','KY');
insert into US_States (StateName,StateAbbreviation) values ('LOUISIANA','LA');
insert into US_States (StateName,StateAbbreviation) values ('MAINE','ME');
insert into US_States (StateName,StateAbbreviation) values ('MARYLAND','MD');
insert into US_States (StateName,StateAbbreviation) values ('MASSACHUSETTS','MA');
insert into US_States (StateName,StateAbbreviation) values ('MICHIGAN','MI');
insert into US_States (StateName,StateAbbreviation) values ('MINNESOTA','MN');
insert into US_States (StateName,StateAbbreviation) values ('MISSISSIPPI','MS');
insert into US_States (StateName,StateAbbreviation) values ('MISSOURI','MO');
insert into US_States (StateName,StateAbbreviation) values ('MONTANA','MT');
insert into US_States (StateName,StateAbbreviation) values ('NEBRASKA','NE');
insert into US_States (StateName,StateAbbreviation) values ('NEVADA ','NV');
insert into US_States (StateName,StateAbbreviation) values ('NEW HAMPSHIRE','NH');
insert into US_States (StateName,StateAbbreviation) values ('NEW JERSEY','NJ');
insert into US_States (StateName,StateAbbreviation) values ('NEW MEXICO','NM');
insert into US_States (StateName,StateAbbreviation) values ('NEW YORK','NY');
insert into US_States (StateName,StateAbbreviation) values ('NORTH CAROLINA','NC');
insert into US_States (StateName,StateAbbreviation) values ('NORTH DAKOTA','ND');
insert into US_States (StateName,StateAbbreviation) values ('OHIO','OH');
insert into US_States (StateName,StateAbbreviation) values ('OKLAHOMA','OK');
insert into US_States (StateName,StateAbbreviation) values ('OREGON ','OR');
insert into US_States (StateName,StateAbbreviation) values ('PENNSYLVANIA','PA');
insert into US_States (StateName,StateAbbreviation) values ('PUERTO RICO','PR');
insert into US_States (StateName,StateAbbreviation) values ('RHODE ISLAND','RI');
insert into US_States (StateName,StateAbbreviation) values ('SOUTH CAROLINA','SC');
insert into US_States (StateName,StateAbbreviation) values ('SOUTH DAKOTA','SD');
insert into US_States (StateName,StateAbbreviation) values ('TENNESSEE','TN');
insert into US_States (StateName,StateAbbreviation) values ('TEXAS','TX');
insert into US_States (StateName,StateAbbreviation) values ('UTAH','UT');
insert into US_States (StateName,StateAbbreviation) values ('VERMONT','VT');
insert into US_States (StateName,StateAbbreviation) values ('U.S. VIRGIN ISLANDS','VI');
insert into US_States (StateName,StateAbbreviation) values ('VIRGINIA','VA');
insert into US_States (StateName,StateAbbreviation) values ('WASHINGTON','WA');
insert into US_States (StateName,StateAbbreviation) values ('WEST VIRGINIA','WV');
insert into US_States (StateName,StateAbbreviation) values ('WISCONSIN','WI');
insert into US_States (StateName,StateAbbreviation) values ('WYOMING','WY');

This data was obtained from the US Postal Service. It does contain additional US territories that the USPS ships to. If you don't want to include this data in your drop down list, then simply delete the rows from the database, or from the script prior to running it.

Once the data is stored in the database, the only thing left to do is bind it to the dropdownlist.  

Happy coding!