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.