1

I've just inherited an app that utilizes usercontrols in a couple ways which I'm not too familiar with. The problem I have right now is that when I attempt to publish this code base, I get a few errors which boil down to where some referenced usercontrols are not defined. Here's an example of one line:

Private clientControl As New ASP.usercontrols_clientcontrol_ascx

This is a tab strip usercontrol which references other usercontrols to dynamically create the tabs. Now, on the surface I get what is going on here...but the compiler is not accepting this. This tab strip usercontrol is in the root of the project, and the other usercontrols are in a sub folder.

error BC30002: Type 'ASP.usercontrols_clientcontrol_ascx' is not defined.

I'm sure this is 101 stuff here, but the build works and the publish fails. Any direction would be appreciated.

3
  • Does it work on your local machine? Commented Mar 5, 2010 at 21:12
  • Yeah it works just fine. The solution builds, I just can't publish and I don't even pretend to understand why. Commented Mar 6, 2010 at 20:50
  • using the class directly... Dim coreProcessesControl As New Usercontrols_ClientControl Changing it to the class name worked, but it looks like when you do this the code behind has no idea that there is anything else. So things like referencing a placeholder on a US fail with no reference. So yeah, this is still jacked and I have no clue how to get around it...other than to change the code to not have a UC call other UCs like this...but rather just create a link to the UCs. Commented Mar 13, 2010 at 16:17

3 Answers 3

3

Try registering your control at the page you are adding it to.

<%@ Register src="usercontrols_clientcontrol_ascx" tagname="usercontrols_clientcontrol" tagprefix="uc1" %>
Sign up to request clarification or add additional context in comments.

1 Comment

not enough in my case: ASP.NET WSP recently upgraded to 4.5 but still not a WAP, still CodeFile/Inherits custom Controls. trying access masterPage class or other custom control from vb.net code behind. Classes are un same Namespace but the userControl don't recognize de class type
1

I don't know if this is the right solution, but had the exact same issue and was able to get it to publish by unchecking the

Allow precompiled site to be updatable

option when publishing. This was in Visual Studio 2008.

1 Comment

It's a mystery. VS2008 and it was 5+ years ago.
0

If you remove the x:name element in the original XAML does it work?

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.