谢谢,上次问题已解决。新问题(一并给分):public void page_load(Object S, EventArgs E)
{
Hashtable CfgSection = Context.GetConfig("test"); --报错点
String Msg = CStr(CfgSection("key"));
lblmsg.Text=Msg;
}报错:
Compiler Error Message: CS0029: Cannot implicitly convert type 'object' to 'System.Collections.Hashtable'如果改为:
public void page_load(Object S, EventArgs E)
{
Hashtable CfgSection = (Hashtable)Context.GetConfig("test");
String Msg = CStr(CfgSection("key")); --报错点
lblmsg.Text=Msg;
}报错:
Compiler Error Message: CS0118: 'CfgSection' denotes a 'variable' where a 'method' was expected
{
Hashtable CfgSection = Context.GetConfig("test"); --报错点
String Msg = CStr(CfgSection("key"));
lblmsg.Text=Msg;
}报错:
Compiler Error Message: CS0029: Cannot implicitly convert type 'object' to 'System.Collections.Hashtable'如果改为:
public void page_load(Object S, EventArgs E)
{
Hashtable CfgSection = (Hashtable)Context.GetConfig("test");
String Msg = CStr(CfgSection("key")); --报错点
lblmsg.Text=Msg;
}报错:
Compiler Error Message: CS0118: 'CfgSection' denotes a 'variable' where a 'method' was expected
解决方案 »
- LinkButton超奇怪问题,跪求高手-在线等
- 大伙来看看啊
- TextBox背景图片怎么实现
- using的问题
- 请问session在StateServer状态下,如何统计在线人数?
- 想做一个比较效率的 无限分类 谁能给我点建议 或者 例子?
- 大家在开发ASP.NET网页时用的是那种工具较多? VS.NET 还是DW MX ?或什么较好的?
- 404 页面 问题 , 高手进!
- 请教大侠,用脚本怎样控制窗口的显示时间?在线等待
- 怎样在自编的控件中输出自己绘制的图像?
- 哪位贡献一份基于ADO.NET beat2 的用C#写的SQL连接及操作的源码?
- 调查:大家用ASP.NET准备用哪种语言,C# or VB7 or Javascript.
报错:Compiler Error Message: CS0103: The name 'CStr' does not exist in the class or namespace 'ASP.formcfg_aspx'
明明应该有值的,为什么是空值呢?CfgSection["key"].ToString();
报错:
Exception Details: System.NullReferenceException: Value null was found where an instance of an object was required.