我的开发环境是:VS2003我的配置文件是:<?xml version="1.0" encoding="gb2312" ?>
<configuration>
<configSections>
<sectionGroup name="system.web">
<section name="sourceview" type="System.Configuration.NameValueSectionHandler,System,Version=1.0.3300.0,Culture=neutral,PublicKeyToken=b77a5c561934e089" />
</sectionGroup>
</configSections> <appSettings>
<add key="RemoteHost" value="false" />
<add key="con" value="server=teach;uid=sa;pwd=;database=dbstuexam"/>
</appSettings>
<system.web>
<!-- <identity impersonate="true" /> -->
<sourceview>
<add key="root" value="E:\StuExamSys" />
</sourceview>
<globalization requestEncoding="gb2312" responseEncoding="gb2312" />
<sessionState
mode="InProc"
cookieless="true"
timeout="10"
/>
<httpRuntime maxRequestLength="47185920">
</httpRuntime>
</system.web>
</configuration>在在ASP.NET页面中怎样引用配置文件中的
add key="con" value="server=teach;uid=sa;pwd=;database=dbstuexam"/>谢谢!
<configuration>
<configSections>
<sectionGroup name="system.web">
<section name="sourceview" type="System.Configuration.NameValueSectionHandler,System,Version=1.0.3300.0,Culture=neutral,PublicKeyToken=b77a5c561934e089" />
</sectionGroup>
</configSections> <appSettings>
<add key="RemoteHost" value="false" />
<add key="con" value="server=teach;uid=sa;pwd=;database=dbstuexam"/>
</appSettings>
<system.web>
<!-- <identity impersonate="true" /> -->
<sourceview>
<add key="root" value="E:\StuExamSys" />
</sourceview>
<globalization requestEncoding="gb2312" responseEncoding="gb2312" />
<sessionState
mode="InProc"
cookieless="true"
timeout="10"
/>
<httpRuntime maxRequestLength="47185920">
</httpRuntime>
</system.web>
</configuration>在在ASP.NET页面中怎样引用配置文件中的
add key="con" value="server=teach;uid=sa;pwd=;database=dbstuexam"/>谢谢!
解决方案 »
- checkboxlist与label(其它的控件也行)自定义组合控件
- 怎样取得Repeater控件中文本编辑器中的值?
- OdbcCommand当在CommandText中判断某个字段为空值是怎么写SQL语句啊?
- 想请教个高难度的问题!不知道有谁肯帮忙!
- 服务器控件在html代码中不能使用服务器变量,请问为什么
- 在文本框中禁止输入特殊字符,怎么实现???
- IIS 301重定向问题
- 高分求助(分不够再加 要多少都行)
- 关于绑定控件的问题
- 请教由datagrid生成的表格的Javascript...
- DataGrid的行点击,色改变,点完这行,但点其它行时刚才那行还是点过的颜色,不能恢复原来的吗,也就是一次只能是点击的那行背景色改变,怎么做
- 版主请帮忙!!关于DataGrid的问题,搜遍所有帖子也没有解决!!!
using System.Configuration;其次在.CS页面里这样:
string myconnstring = ConfigurationSettings.AppSettings["con"];
string strConnection = System.Configuration.ConfigurationSettings.AppSettings["con"];