zoukankan      html  css  js  c++  java
  • Ambiguous match found in web application

    Today, we met a problem: everything is ok after I convert vs2003 to vs2008 except when execute a one page, the error is : Ambiguous match found. and runTime parser indicates this error occurs at <@ <%@ Page language="c#" Codebehind=....%>. Build process is ok, not any error occurs. After find help from internet, there is saying:

    It seems like you have two variables in your page that differ only in the
    case. For example, in your aspx page, you might have

    <asp:TextBox ID="UserID" runat="server"/>

    and in the code behind file you might have

    private Int32 userID = 0;

    Note that in my example, even though the variables have different
    accessiblity and types, the variable names are similar (the difference is
    only in the case).

    In my opinion, this is a bug - C# is case sensitive and the above code is
    perfectly legal from the point of view of the C# compiler. This explains why
    it works as intended from within the VS 2005 IDE. The aspnet_compiler too
    does not report any errors when you try to compile you website. However, some
    error in the reflection mechanism causes a case insensitive search and that
    is the reason for this "Ambiguous match found." error.

     

    from the source code review, yes, it is, there is LinkButton1 and Linkbutton1 2 varibles declaration. after remove one, everyting is OK.


  • 相关阅读:
    python远程执行dos命令
    python调用cmd显示中文乱码及调用cmd命令
    centos密码策略
    windows密码策略
    windows注册表解析说明
    Acwing-252-树(点分治)
    Gym-10071A-Queries(树状数组)
    2019ICPC沈阳网络赛-B-Dudu's maze(缩点)
    2019ICPC沈阳网络赛-D-Fish eating fruit(树上DP, 换根, 点分治)
    平衡树
  • 原文地址:https://www.cnblogs.com/sdikerdong/p/1749023.html
Copyright © 2011-2022 走看看