比如我在web.config有句话
<add key="DBtype" value="Accsee"/>然后我在.cs页面有句代码是这样的:   string Path_db = ConfigurationManager.AppSettings["DBPath"];为什么path_db得到的值的是“data\doughty_bbs.mdb”,而不是access 

解决方案 »

  1.   

    string Path_db = ConfigurationManager.AppSettings["DBPath"];
    你的代码写错了应该是
    string Path_db = ConfigurationManager.AppSettings["DBtype"];
    DBtype才是Key
      

  2.   

     如果  <add key="DBtype" value="Accsee"/>
    cs 代码里 应该是
    string Path_db = ConfigurationManager.AppSettings["DBtype"];
      

  3.   

    string Path_db = ConfigurationManager.AppSettings["DBtype"];