Use the web.config file.
Assuming that you are working on .NET 1.1, you would have to add the block, and under this you would declare a key-value pair to hold your connection string. Then, using the AppSettingsReader object, you can extract this value. (look at MSDN for an example).
But if you are working with .NET 2.0, then, you should declare your connection string under the section. This would be automatically read and made available by ASP.NET when your application runs.
In either case, this connection string is not embeded in the web.config file using any encryption. Remember, ASP.NET is configured to ensure that a request for this file will not be handled. Meaning, if any one places a request for the file Web.Config, ASP.NET will not deliver it. (This is of course assuming that you have ensured that IIS is configured to disable directory file listing).
Now. Regards to the User ID and Password in the connection string. First of all - if you are using SQL Server as the database, don't provide the User ID or Password. Instead opt for Windows Authentication. This is the best option. In such a case, you have two provisions. You can either add the web server's local ASPNET account to the DB Secured Logins and grant access to the DB. Or you can use the