I was going to do that, but I was also looking for a programmatic way to do it. Previously, I had made my own custom data layer and included logic for it to determine which environment it was in, local or remote. This way I wouldn't have to update the web.config when I published. I tried to use a partial class, either I didn't do it correctly, or it just didnt work.
JMirando
Posts
-
ASP.NET using C# InitConnection() Issue -
Visual Studio IssueWhen the build fails, are there any error codes? I had a similar problem with VS05 and it was related to duplicate class names. To find it, set your projects build output verbosity to "Diagnostic". This can be found here: Tools > Options In the dialog window, expand "Projects and Solutions" Select "Build and Run" It's the last option, its label is "MSBuild project build output verbosity" When you build afterwards, take a look through the results in the output window, you may be able to find something there. Hope it helps.
-
ASP.NET using C# InitConnection() IssueI am using the visual studio designer and creating table adapters and strongly typed datasets. The question I have is how to override the InitConnection() method the designer creates for you. I have two connection strings I would want to use (say local and remote). So I want to extend/enhance this method to determine which one it should be using. Any thoughts?