"The base class includes the field 'WebUserControl1', but its type (common_WebUserControl) is not compatible with the type of control (ASP.common_webusercontrol_ascx)"
RSS
but I have not made any changes to the structure of the website, the usercontrol in question was working perfectly from a long time. It was just on saturday that I got this problem. I tried the solution that you have given here ie. transferring the usercontrol
to the same folder as the page. But it will require changing the register tag in all the pages that include the said control. Moreover, did u find the reason why this problem occurred in the first place?
This problem normally occurs if you keep user controls in diffrent directories or name spaces, moving them to same namespace and physical directry solved this problem for me.
We had a similar issue. Our user controls lived in a directory called "Controls"
In an effort to group related controls some of the user controls were put in subdirectories under the controls directory. We noticed the problem surfaced when a user control in a subdirectory was referring to another usercontrol in the parent directory
(eg A SearchList control in the \Controls\SearchItems directory used a ModalDialogue control in the \Controls Directory.
A clone of the ModalDialogue Control was created in the \Controls\SearchItems subdirectory. The new control was given a different name (ModalDialogTest) to be sure to isolate which control was being used. This worked fine. We then hit on the idea of parking
the modal dialogue control in its own subdirectory. (out from the parent "\Controls" directory)
A Subdirectory was created "\Controls\Modal". Our ModalDialogue control was created in this subdirectory and it cured the problem. I hope this helps someone out.
hey i have encountered a similar problem but in .net 3.5. i have tried all the solutions mentioned here for .net 2.0 i.e. vs2005.. my app was developed in vs2003 v1.1 and then converted to vs2008 v3.5. earlier this problem was not there and the website was
running w/o any glitch but this problem occurred suddenly a few weeks back.. i've been trying to solve it but in vain. can anyone please suggest what i should do?
Hi, have you tried the possible solution suggested by Maduka?
Here it is:
Hi
try to create a new usercontrol in vs.net 2005. It will create as CodeBehind not as CodeFile. I guess CodeBehind is the suitable property in the vs.net 2005.
CodeFile willl work with converted .net projects(vs.net 2003 to vs.net 2005). But when you try to add new web form to converted project and try to use an user control of vs.net 2003 version, this error occurs.
pradman2005
Member
8 Points
12 Posts
Re: "The base class includes the field 'WebUserControl1', but its type (common_WebUserControl) is...
Jul 07, 2008 05:45 AM|LINK
Hi Net,
Even I experienced the same problem...
but I have not made any changes to the structure of the website, the usercontrol in question was working perfectly from a long time. It was just on saturday that I got this problem. I tried the solution that you have given here ie. transferring the usercontrol to the same folder as the page. But it will require changing the register tag in all the pages that include the said control. Moreover, did u find the reason why this problem occurred in the first place?
Awaiting your reply.
rajquest
Member
2 Points
3 Posts
Re: "The base class includes the field 'WebUserControl1', but its type (common_WebUserControl) is...
Feb 18, 2009 09:39 PM|LINK
This solution worked for me right away.
Removed the ID tag. Is there a reason why the ID tag would cause this error ?
****** Worked for me *****************
Thanks
ozkary
Contributor
2034 Points
303 Posts
Re: "The base class includes the field 'WebUserControl1', but its type (common_WebUserControl) is...
May 14, 2009 10:08 PM|LINK
Hello,
This run-time error also shows when the mark-up has some invalid format. For example, if the control has this control directive:
<%
Control Language="C#"when it should be
<%
@ Control Language="C#" (NOTE THE @)Something small that can get overlooked.
I hope it helps
og-bit.com
dvisaria
Member
2 Points
1 Post
Re: "The base class includes the field 'WebUserControl1', but its type (common_WebUserControl) is...
Jun 05, 2009 07:57 PM|LINK
It does solve my problem. I wasted 4 hr try to solve problem by deleting temporaroy files. But this does the trick.
pilot1
Member
2 Points
1 Post
Re: "The base class includes the field 'WebUserControl1', but its type (common_WebUserControl) is...
Jul 02, 2009 07:38 AM|LINK
See http://support.microsoft.com/kb/919284.
It also could happen because Inherits="xxx" attribute has value of unexisting class.
Ajitchahal
Member
2 Points
2 Posts
Re: "The base class includes the field 'WebUserControl1', but its type (common_WebUserControl) is...
Sep 11, 2009 07:10 PM|LINK
Hi,
This problem normally occurs if you keep user controls in diffrent directories or name spaces, moving them to same namespace and physical directry solved this problem for me.
Hope this helps.
Thanks,
Ajit
mickeyding
Member
2 Points
2 Posts
Re: "The base class includes the field 'WebUserControl1', but its type (common_WebUserControl) is...
Oct 09, 2009 04:17 AM|LINK
We had a similar issue. Our user controls lived in a directory called "Controls"
In an effort to group related controls some of the user controls were put in subdirectories under the controls directory. We noticed the problem surfaced when a user control in a subdirectory was referring to another usercontrol in the parent directory (eg A SearchList control in the \Controls\SearchItems directory used a ModalDialogue control in the \Controls Directory.
A clone of the ModalDialogue Control was created in the \Controls\SearchItems subdirectory. The new control was given a different name (ModalDialogTest) to be sure to isolate which control was being used. This worked fine. We then hit on the idea of parking the modal dialogue control in its own subdirectory. (out from the parent "\Controls" directory)
A Subdirectory was created "\Controls\Modal". Our ModalDialogue control was created in this subdirectory and it cured the problem. I hope this helps someone out.
sean717
Member
16 Points
22 Posts
Re: "The base class includes the field 'WebUserControl1', but its type (common_WebUserControl) is...
Oct 14, 2009 09:13 PM|LINK
I had the same problem, after I made change according to what Maduka suggested, eveything works fine now.
Thanks!
praddy
Member
4 Points
2 Posts
Re: "The base class includes the field 'WebUserControl1', but its type (common_WebUserControl) is...
Oct 19, 2009 02:15 PM|LINK
hey i have encountered a similar problem but in .net 3.5. i have tried all the solutions mentioned here for .net 2.0 i.e. vs2005.. my app was developed in vs2003 v1.1 and then converted to vs2008 v3.5. earlier this problem was not there and the website was running w/o any glitch but this problem occurred suddenly a few weeks back.. i've been trying to solve it but in vain. can anyone please suggest what i should do?
sean717
Member
16 Points
22 Posts
Re: "The base class includes the field 'WebUserControl1', but its type (common_WebUserControl) is...
Oct 19, 2009 11:07 PM|LINK
Hi, have you tried the possible solution suggested by Maduka?
Here it is:
Hi
try to create a new usercontrol in vs.net 2005. It will create as CodeBehind not as CodeFile. I guess CodeBehind is the suitable property in the vs.net 2005.
CodeFile willl work with converted .net projects(vs.net 2003 to vs.net 2005). But when you try to add new web form to converted project and try to use an user control of vs.net 2003 version, this error occurs.
Rgds
Maduka