I have a C # .net project with SQL Server 2008 written in Visual Studio 2008. There I used the following connection string to connect to SQL Server:
string connectionString =
@"server=HASIBPC\SQLEXPRESS; Integrated Security=SSPI;
database=XPHotelManagementDatabase";
But the problem is, every time I take my application from one computer to another computer, I need to change serverto connectionString. I do not want to change this manually. I want this to change dynamically. How to do this using app.config?
source
share