Tuesday, March 8, 2011

Referring to Connection String in Web.Config

When instantiating the SqlConnection object:


MyConnString = ConfigurationManager.ConnectionStrings("TheConnectionString").ConnectionString


Where "TheConnectionString" is the name of the connection string in Web.Config.


"SqlConnection Class (System.Data.SqlClient)" ( http://bit.ly/J5ew4y )

No comments:

Post a Comment