web config 配置

来源:互联网 发布:windows azure 中国 编辑:程序博客网 时间:2024/06/06 09:16

固定不变的的东西可以在web config 中配置;

如 路径,字符值

读取的时候再从web config中读取

 

 

 <appSettings>

 <add key="SessionName" value="dxm"/>

</appSetting>

读:string name=ConfigurationManager.AppSettings["SessionName"]

<connectionStrings>
  <add name="ApplicationServices" connectionString="data source=. ;User Instance=true" providerName="   System.Data.SqlClient"/>

</connectionStrings>

原创粉丝点击