title: Change default database with ASP.NET Web Application
body: <p>I have created a C# ASP.NET web site in Visual Studio 2010.  Pretty much all of the other kinks have been worked out, but the site is to have a database that stores certain user data.  I have this DB stored on a drive on a SQL Server (let's say it's on the E drive of a server with an IP of 192.168.6.100).  We have a DSN on this server set up to be used with this db.  I used a Visual Studio template for my site (just the regular C# ASP.NET template), so it had an account db and login/register sites pre-made.  The default DB that they give you is in an App_Data folder with the name aspnetdb.mdf.  In the web.config file, I've got the following connection string.</p>
  
  <pre><code>&lt;connectionStrings&gt;
  &lt;add name="ApplicationServices"
       connectionString="data source=.\SQLEXPRESS;Integrated
       Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true"
       providerName="System.Data.SqlClient" /&gt;
  &lt;/connectionStrings&gt;
  </code></pre>
  
  <p>My question is what is going to be the easiest way to convert the default code so that it will allow the other database to be used, but still reside on the 192.168.6.100 server?  I don't want to use the built in DB because there are going to be additional tables that I need to create and store.  I would have figured I could just change the connection string and the methods that access data in the DB, but can't find the proper syntax given the location of the db.  Also, in the default template, I don't see anywhere where the calls are being made to actually save the data into the specified database (can't find any SQL statements in the backend code that store to aspnetdb.mdf).  Does anyone know where this takes place?  Should I just scrap the default setup and make my own login/register pages?</p>