Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jan 07, 2013 09:21 AM by krunal_it17
Nov 18, 2010 03:31 PM|LINK
I have an EnvironmentsConfig folder in it I have a file connectionstrings.config
It has a connection string that I need to retrieve. I understand how to do this using the web.config but I can't seem to find the correct C# code for pulling it from this new folder and file.
Here is the xml in the connectionstring.config file
<add name="DBConnection" connectionString="Data Source=xxx,111;Initial Catalog=somedb;User ID=someuser;Password=somepassword;" />
Normally I would use the following code to get the connection string
can someone please show me the correct syntax?
Nov 18, 2010 04:06 PM|LINK
Added the following to my WebConfig file. This allows me to pull the connection information from the connectionstring.config file through the web.config and everything works as it should.
Jan 07, 2013 09:21 AM|LINK
i need to write my connection string dynamically in that
"connectionstrings.config" file so how can I do this.