I've been getting this error intermittently for a while now and finally got tired of seeing it, so I started looking for causes and solutions. The exact error I was getting is shown below. Note that it could appear with the same error 'BC30560', but have a different class name and different namespace.
Compiler Error Message: BC30560: 'Login_ascx' is ambiguous in the namespace 'ASP'
I couldn't really find a clear answer as it seems it can be caused by different scenarios, some of which may be a result of a bug in the framework. In my case it was a simple fix, although I don't know why this fixed it.
I had a page named Login.aspx and a User Control that resided on that page named Login.ascx. Why did I do it this way? Because I used the Login.aspx page as the primary login page, but there were other scenarios where I wanted to show a login without redirecting to the login page. So I created a User Control that I could put anywhere I wanted.
It seems as though there is a bug in the asp.net framework since my page and my control have different file extensions and different class names. Yet as soon as I changed my User Control to be named LoginCtrl.ascx, the error stopped appearing. |