1. the Code Section is directly opened through the vs development environment, mainly web. config configuration file, <add name = "dbConnectionString" connectionString = "server = ASUS-14C4E4992D \ SQLEXPRESS; database = register; Integrated Security = True;"/> such as above, connectionString = server where the server is connected to the database server you configured locally. 2. Deploy the local database. Generally, the database files are in the App_Data folder in the Code. The extension is. mdf and ldf. 3. make sure that SQL server is installed on the local machine. Copy the two databases to the installation path of the local SQL server. For example, the installation path is C: \ Program Files \ Microsoft SQL Server \ MSSQL10. under the Server name \ MSSQL \ DATA. 4 ., I have installed SQL 2008. After opening it, right-click the database and choose "Attach Database". The "Attach Database" dialog box is displayed. Select the database to be appended. The path is C: \ Program Files \ Microsoft SQL Server \ MSSQL10.YXM \ MSSQL \ DATA. 5. Click OK. 6. return to the Code to view the web. in the config file, append the corresponding server = the name of the server that you have attached to the database, as shown in <add name = "dbConnectionString" connectionString = "server =. \ Server Name; database = register; Integrated Security = True; "/> 7. the deployment of asp.net + SQL server is similar to the above steps.