Learning Resources
Adding a database to the project
To create a database
-
In Visual Web Developer, open Solution Explorer, right-click the App_Data folder of your Web application, and then click Add New Item.
--or--
If your application does not have an App_Data folder, right-click the root folder of your Web application, click Add ASP.NET Folder, and then click App_Data.
-
Click SQL Database, type a name for the .mdf database file, and then click Add.
Two files are created: DataBaseName.mdf and DataBaseName_log.ldf. Visual Web Developer automatically moves focus to the Data Connections section of the Server Explorer window and selects the newly created database.
To add a new database to the project
-
From the Project menu, choose Add New Item.
-
Select SQL Database from the list of available templates.
-
Type SampleDatabase in the Name area.
-
Click Add.
The Data Source Configuration Wizard opens, but no database objects are available because this is a new database.
-
Click Finish to create the database and dataset and add them to the project.