posted 3/12/2007 by Vivek Thakur
using System.Configuration; class A { /// <summary> /// Returns the connection string from the web.config file /// </summary> /// <returns></returns> public static string GetConnectionString() { ///<remarks> ///Get the DB Connection String from web.config ///</remarks> return ConfigurationManager.ConnectionStrings["ConnectionString"].ToString(); }
What kind of email newsletter would you prefer to receive from CodeAsp.Net?18