getting connection string from webconfig file





0
Date Submitted Thu. Mar. 19th, 2009 8:04 AM
Revision 1 of 1
Scripter mycodeofshailendra
Tags C
Comments 0 comments
getting connection string from webconfig file


//in config file
<connectionStrings>
    <add name="FunstoreConnectionString" connectionString="Data Source=server_name;Initial Catalog=funstore;User ID=user_name;Password=passowrd" />
  </connectionStrings>

// getting connection string
...ConfigurationManager.ConnectionStrings["FunstoreConnectionString"].ConnectionString;

 

shailendra bhadange

shailendra-problemsolution.blogspot.com/
Shailendra Bhadange

Comments

There are currently no comments for this snippet.

Voting

Votes Up


Votes Down