Currently having a small problem, how do I set the connection string to be user specific in VS2008. I have a Solution that consists of 2 projects and I want both projects to use the same data source, at the moment its hard coded as an application setting so the system crashes when installed on another pc.
Connection string are stored in Web.Config file. Simply open that file, look for the connection string and change it.
Hello, You can save connectionstring in app.config file. Reference: hxxp://social.msdn.microsoft.com/Forums/en-US/adodotnetdataproviders/thread/9a8c9f5a-092e-4c4a-87bb-9f35d8f55da1 If you want to change connectionstring by user. You can use System.Configuration.ConfigurationSettings.AppSettings.Set(name, value); function Reference: hxxp://social.msdn.microsoft.com/Forums/en-US/netfxbcl/thread/813c7b30-9d18-4484-86a0-630b54c897f3 HTH
its a gud practice to save connectioon string in web.config file. but if u r doing windows application thn u kn go to project properties.and thn click on setting thr u kn save,,it will save it in app.config file.