.Net2.0 reads application configuration section
Author:Eve Cole
Update Time:2009-06-30 16:09:31
Method one: Add namespace: using System.Configuration; Then string strDbConn = new AppSettingsReader().GetValue("dbconn", typeof(string)).ToString(); Method two: Add reference: (system.configuration) Add name Space using System.Configuration;string strDbConn = ConfigurationManager.AppSettings["dbconn"]; It's actually quite simple, don't scold me, write it down for others to see:)