Connection String
ASP.NET
3
Posts
2
Posters
0
Views
1
Watching
-
If I have something similar to this in web.config: <connectionStrings> <add name="ConnString" connectionString="Data Source=localhost;Integrated Security=SSPI;Initial Catalog=Northwind;" /> </connectionStrings> How do I access "ConnString" it from a C# file?
-
If I have something similar to this in web.config: <connectionStrings> <add name="ConnString" connectionString="Data Source=localhost;Integrated Security=SSPI;Initial Catalog=Northwind;" /> </connectionStrings> How do I access "ConnString" it from a C# file?
-
Use 2.0: System.Configuration.ConfigurationManager.ConnectionStrings["ConnString"].ConnectionString Hope this helps! Christopher Reed "The oxen are slow, but the earth is patient."