Vs BUG: cannot convert type 'asp. login_aspx 'to 'System. Web. UI. webcontrols. login &#

Source: Internet
Author: User

I am working on a B/S application these two days and have been writing it on my own machine. Everything seems to be fine. yesterday, my boss wanted to see how much I did, so I published it to IIS: This is the benefit of B/S and can be shown to the boss at any time, instead of bringing the boss to my office, or installing half-products on his computer.

However, after the release, it was found that it could not be accessed and an error was reported:
Cannot convert type 'asp. login_aspx 'to 'System. Web. UI. webcontrols. login'
Strange! Why is there a problem with the release of? However, I had no time to study, so I had to invite my boss to my office and let him have a look. today, I started to study this error. I read the error code carefully and found that the code automatically generated by vs encountered an error. I don't know why it didn't convert the page class into a webcontrols class, I have been depressed for a long time and have not figured it out. then I went to Google for a search and found the cause on this URL soon:
Http://www.groupsrv.com/dotnet/about147910.html
It turned out to be a bug in vs. The page class is called "login", and a login control is also called "login", so the compiler is confused, it is necessary to convert the page into a control, and the result will certainly be incorrect.

Solution: use login. change the name on the ASPX page. Of course, the class name must be changed accordingly. for example, you can put login. change aspx to loginpage. aspx, re-release, everything is OK.

Related Article

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.