首页 > 学院 > 开发设计 > 正文

web.config配置

2019-11-17 01:59:33
字体:
来源:转载
供稿:网友

web.config配置

<appSettings>    <add key="DepartmentRootID" value="A90AEAEC-E3D4-43DE-BB67-85407B57B171" />  </appSettings>

  有时候一个全局的值可以设置到appSettings里,通过下面代码调用

string deptid = ConfigurationManager.AppSettings["DepartmentRootID"];

  不过建议写在connectionStrings里

  http://www.VEVb.com/hakuci/archive/2008/04/18/1159693.html

  这里有关于appSettings和connectionStrings的说明


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表