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.


  • 相关阅读:
    第三章感想
    第二章感想
    第一章感想
    第9章 硬件抽象层:HAL
    第10章 嵌入式linux的调试技术
    第8章 蜂鸣器驱动
    第七章 I/O
    第六章 编写Linux驱动程序
    第五章 S3C6410
    源代码的下载和编译
  • 原文地址:https://www.cnblogs.com/sdikerdong/p/1749023.html
Copyright © 2011-2022 走看看