Last post Mar 06, 2013 12:51 AM by JoshuaCU
Jul 24, 2007 11:50 AM|jrblack10|LINK
I have read all kinds of blogs and posts on your site and I may have missed a solution and if I have I apologize. But here is my problem.
I have been trying to upgrade my existing VS 2005 Web Site to a Web Application (that comes with SP1). I followed Scott's migration tutorial [
http://webproject.scottgu.com/CSharp/Migration2/Migration2.aspx ] but I have many problems regarding UserControls. If you can help me or point me in the right direction, that would be great.
All my user controls report the same error. "Element 'UserControl' is not a known element. This can occur if there is a compilation error in the Web site."
This may or may not be related to all server controls and user controls that are inside an AJAX UpdatePanel report a compile error: "The name 'ControlName' does not exist in the current context"
The above errors are the ONLY errors I get during compile. If you can help in any way, that would be GREAT!
Sample .aspx code, with ucObjContent errors...
<%@ Control Language="C#" AutoEventWireup="true" Inherits="BINavigator.Dashboard_UserControls_ucLayout" Codebehind="ucLayout.ascx.cs" %>
<%@ Register TagPrefix="uc1" TagName="ucObjContent" src="ucObjContent.ascx" %>
<%= GetFrameTablePart("a") %>
<uc1:ucObjContent id="ucObjContent1" runat="server" />
<%= GetFrameTablePart("b") %>
<uc1:ucObjContent id="ucObjContent2" runat="server" />
ASP.NET "Web Reference" "Web Application Projection" appSettings
Visual Studio 2005 SP1 Service Pack 1
Aug 03, 2010 10:40 AM|sumanth.ineni|LINK
I know this is quite an old post but just replying so that people who visit might benefit.(If my solution below fixes the problem).
Right click on the project and select clean and then build the project again.
Cleaning should clear all the dll's in your bin directory and build the project from scratch.
Mar 06, 2013 12:51 AM|JoshuaCU|LINK
Also, make sure that you didn't forget or obliterate 'public' on the custom control's constructor. If you hide the constructor this is what you get.