C:\Inetpub\wwwroot\jgyjgl_1\Login.aspx.cs(64): 找不到类型或命名空间名称“ConfigurationSettings”(是否缺少 using 指令或程序集引用?)代码:
string strconn = ConfigurationSettings.AppSettings["dsn"];错误原因是什么呀?
string strconn = ConfigurationSettings.AppSettings["dsn"];错误原因是什么呀?
解决方案 »
- VS.NET2005中编辑HTML添加<!--注释的快捷键是什么?
- 关于Redirct与Session和window.location.herf与CSS文件调用的问题...
- ASCII码处理的问题
- 偶今天感到很耻辱?国民最基础的服务都要收钱?
- 关于static的用法
- 当点击ImageButton以后怎么能弹出一个新的窗口?
- sql问题......................哪位大仙过来指点下
- 续如何提高asp.net应用程序的运行速度
- gidview中checkbox的数据绑定出了问题,求教~!
- dropdownlist想做成这样的效果,大家来看看
- 如何让DataGridView实现Gridview的翻页功能
- 求一Sql 语句!
說的沒錯﹐正解。
这样永远不会错的
或自己手动添加using System.Configuration;
string connStr=System.Configuration.ConfigurationSettings.AppSettings;["SQLCONNECTIONSTRING"];
如果是2005的话,用法不同:
string connStr=System.Configuration.ConfigurationManager.ConnectionStrings;["SQLCONNECTIONSTRING"].ToString();