关于ASP.NET页面级别的控件声明

在页面里不要声明成这样的形式:

protected System.Web.UI.WebControls.Image IMG; 

protected System.Web.UI.WebControls.Image img;

虽然C#是区分大小写的,但是ASP.NET运行到页面级时,就不区分了

这样会添加两个,img对象,导致重名。

奇怪的是在1.0的时候这种情况是允许的,但是2.0就会报错了~

Parser Error

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Ambiguous match found.

 

分析器错误

说明: 在分析向此请求提供服务所需资源时出错。请检查下列特定分析错误详细信息并适当地修改源文件。

分析器错误信息: 发现不明确的匹配。

转载于:https://www.cnblogs.com/slimpotato/archive/2007/10/09/1973353.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值