摘要:
类 public string GetConStr() { try { XmlDocument xmlDoc = new XmlDocument(); xmlDoc.Load(Server.MapPath("App_Data\\config.xml")); XmlNode node1 = xmlDoc.SelectSingleNode("configuration/ConnectionString... 阅读全文
摘要:
在开发的过程中,很多时候我们需要用到配置文件,根据个人喜好或者开发需求,我们经常会把配置信息写到文本或者xml文件里面。在桌面程序开发中,便于调试,安装人员的操作方便,一般把配置写到文本里面,对于 Web 程序,一般把配置写到XML文件里面,下面是我实现的方法:从文本里面读配置在类文件 GlobalVariabletxt 中static GlobalVariabletxt(){try{string... 阅读全文