BC30554: 'commoncontrols_searchlist' is ambiguous.

G

Guest

This is really weird,

I have a project with a few hundred pages and usercontrols, the project has
been working for a couple of weeks now and I went to make some changes in my
localhost, when hitting the site I got an error in one page saying it could
not load a usercontrol because it was not the right type, and then when I
opened the page in question in VS 2005 I got a lot of errors everytime I
define a control to be loaded using Loadcontrol("path"). It says:

BC30554: 'commoncontrols_searchlist' is ambiguous.

And now when I tried to hit the site on my localhost It does not work and
gives me the same error. Has anybody else seen this?

The control has a reference on the aspx side that looks like this:

<%@ Reference Control="~/commoncontrols/searchlist.ascx" %>

and then in the vb file I have:

Dim showlist As commoncontrols_searchlist =
LoadControl("/commoncontrols/searchlist.ascx")

It used to work, in fact I have the site in production working but I can not
make changes in my localhost now.

thanks,
Marcelo Cabrera.
 
G

Guest

I found the problem,

I used VS2003 before and compiled an ASP.NET solution in 'release' mode,
then switch IIS on my localhost to another project and loaded a site on
VS2005 , compiling in 'debug' mode, somehow the VS2005 project was behaving
like an old 2003 web project, where you can reference any .ascx from your
code behind as long as it exists in your project and because I had a
reference in the aspx file it was declared/referenced twice.

How to fix it:
Open the site in VS2005 and select 'release' build, then rebuild the entire
thing, change it back to 'debug' and then rebuild. that's all.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top