"The base class includes the field 'WebUserControl1', but its type (common_WebUserControl) is not compatible with the type of control (ASP.common_webusercontrol_ascx)"

Rate It (1)

Last post 10-20-2009 2:00 AM by vijay_010237866. 41 replies.

Sort Posts:

  • Re: "The base class includes the field 'WebUserControl1', but its type (common_WebUserControl) is not compatible with the type of control (ASP.common_webusercontrol_ascx)"

    07-07-2008, 1:45 AM
    • Member
      8 point Member
    • pradman2005
    • Member since 06-09-2008, 5:27 AM
    • Mumbai, India
    • Posts 12

    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.

  • Re: "The base class includes the field 'WebUserControl1', but its type (common_WebUserControl) is not compatible with the type of control (ASP.common_webusercontrol_ascx)"

    02-18-2009, 5:39 PM
    • Member
      2 point Member
    • rajquest
    • Member since 02-18-2009, 8:28 PM
    • Chicago
    • Posts 3

    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

  • Re: "The base class includes the field 'WebUserControl1', but its type (common_WebUserControl) is not compatible with the type of control (ASP.common_webusercontrol_ascx)"

    05-14-2009, 6:08 PM
    • Member
      46 point Member
    • ozkary
    • Member since 06-20-2006, 3:06 PM
    • Posts 13

    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

    0zkar
  • Re: "The base class includes the field 'WebUserControl1', but its type (common_WebUserControl) is not compatible with the type of control (ASP.common_webusercontrol_ascx)"

    06-05-2009, 3:57 PM
    • Member
      2 point Member
    • dvisaria
    • Member since 05-15-2009, 1:56 AM
    • Posts 1

    It does solve my problem. I wasted 4 hr try to solve problem by deleting temporaroy files. But this does the trick.

  • Re: "The base class includes the field 'WebUserControl1', but its type (common_WebUserControl) is not compatible with the type of control (ASP.common_webusercontrol_ascx)"

    07-02-2009, 3:38 AM
    • Member
      2 point Member
    • pilot1
    • Member since 07-02-2009, 7:36 AM
    • Posts 1

    See http://support.microsoft.com/kb/919284.

    It also could happen because Inherits="xxx" attribute has value of unexisting class.

  • Re: "The base class includes the field 'WebUserControl1', but its type (common_WebUserControl) is not compatible with the type of control (ASP.common_webusercontrol_ascx)"

    09-11-2009, 3:10 PM
    • Member
      2 point Member
    • Ajitchahal
    • Member since 07-26-2007, 10:19 AM
    • Munich, Germany
    • Posts 2

    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

  • Re: "The base class includes the field 'WebUserControl1', but its type (common_WebUserControl) is not compatible with the type of control (ASP.common_webusercontrol_ascx)"

    10-09-2009, 12:17 AM
    • Member
      2 point Member
    • mickeyding
    • Member since 10-09-2009, 4:05 AM
    • Posts 1

     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.

  • Re: "The base class includes the field 'WebUserControl1', but its type (common_WebUserControl) is not compatible with the type of control (ASP.common_webusercontrol_ascx)"

    10-14-2009, 5:13 PM
    • Member
      8 point Member
    • sean717
    • Member since 01-16-2007, 11:43 PM
    • Vancouver, BC
    • Posts 13

     

    Maduka:
    Maduka


    I had the same problem, after I made change according to what Maduka suggested, eveything works fine now.


    Thanks!

    阴晴圆缺在窗外,心中一片艳阳天
  • Re: "The base class includes the field 'WebUserControl1', but its type (common_WebUserControl) is not compatible with the type of control (ASP.common_webusercontrol_ascx)"

    10-19-2009, 10:15 AM
    • Member
      4 point Member
    • praddy
    • Member since 02-16-2009, 10:12 AM
    • Posts 2

    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? 

  • Re: "The base class includes the field 'WebUserControl1', but its type (common_WebUserControl) is not compatible with the type of control (ASP.common_webusercontrol_ascx)"

    10-19-2009, 7:07 PM
    • Member
      8 point Member
    • sean717
    • Member since 01-16-2007, 11:43 PM
    • Vancouver, BC
    • Posts 13

    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


    阴晴圆缺在窗外,心中一片艳阳天
  • Re: "The base class includes the field 'WebUserControl1', but its type (common_WebUserControl) is not compatible with the type of control (ASP.common_webusercontrol_ascx)"

    10-20-2009, 1:44 AM
    • Member
      4 point Member
    • praddy
    • Member since 02-16-2009, 10:12 AM
    • Posts 2

    thanks for the suggestion but  this solution is not applicable in vs 2008.. the usercontrol comes with the codefile tag and not the codebehind tag by default.. if u mention the codebehind it throws a compilation error.. is there any other solution?

  • Re: "The base class includes the field 'WebUserControl1', but its type (common_WebUserControl) is not compatible with the type of control (ASP.common_webusercontrol_ascx)"

    10-20-2009, 2:00 AM

    In the reference the path of the control given must be ~/Common/User.ascx.

     

Page 3 of 3 (42 items) < Previous 1 2 3