I have an application that I want to be able to configure the connection string for my LINQ to SQL. I\'ve tried so many different ways but cannot seem to get it working. I w
The DBML class (YourDataContext) has an overloaded constructor which takes ConnectionString, so try instantiating that instead of the default one.Get the connection string from app.config and use that to create the instance.
YourDataContext context = new YourDataContext (ConfigurationManager.ConnectionStrings["ConnStringInAppConfig"].ConnectionString)