[C #] analyzer error message: ambiguous matching is found.

Source: Internet
Author: User

(1) Same variable name

Protected system. Web. UI. webcontrols. Label lbltitle; protected system. Web. UI. webcontrols. Label lbltitle;

(2)

Check whether the control on your ASPX page has the same name (case-insensitive) ID as the class variable in your Aspx. CS.
The details are as follows:
<Input name = "username" runat = "server" type = "text" id = "username">
In Aspx. CS code, Public String username = NULL;
Conflict! Modify the variable username2 in Aspx. CS and click OK.
This is because when you start it in Vs, the dev Web will distinguish between the control and the background code variables in case,
After being deployed to the IIS server, the server is case-insensitive, so the variable name is duplicated, resulting in an "ambiguous match" error.

(3)

Space ID conflict. Although vs detects and modifies conflicting IDS by itself, not all cases can be detected.

On my page, there is an upload control with ID = fileupload, and a div with ID = fileupload, which has the runat = server attribute. vs cannot detect any of them, therefore, an error occurs on IIS.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.