Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

get connectionstring from web config c#

// Add a using directive at the top of your code file    
using System.Configuration;

// Within the code body set your variable    
string cs = ConfigurationManager.ConnectionStrings["connectionStringName"].ConnectionString;
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #connectionstring #web #config
ADD COMMENT
Topic
Name
2+5 =