Posts

Showing posts from May, 2017

How to make Dynamic DropDownList in Asp.net

Image
Step 1 : Create a new Asp.net Empty Web Site Step 2 : Create new Web form then take 2 DropDownList and also take 2 label denoting the DropDownLinst eg like this: Step 3 : now give Different ID to both DropDownList Eg: StateDDL to state DropDownList and CityDDL to city DropDownList eg like this : Step 4 : Now Create new SQL Server Database then it will ask you to add App_Data click yes now go to server explorer and create two new tables named State and City If u are using Visual Studio 2010 then after entering data just ctrl+s n it will ask u name for State table give name State and for City table give name City And if you are using Visual Studio 2012 just enter a data and give name in its code section like this: CREATE TABLE [dbo].[ State ] and for saving table click on update button in upper left corner and then click on update database. for State: *** Note StateID is Primary Key *** And for Ci...