Error: The base class includes the field 'Left1', but its type (left) is not compatible with the typ

Discussion in 'ASP .Net' started by John Dalberg, Jan 7, 2007.

  1. John Dalberg

    John Dalberg Guest

    Running VS 2005 SP1.

    I am getting errors on pages which contain custom controls.
    A typical error looks like this: (This is from a test aspx page which only
    contains the custom control)

    Parser Error Message: The base class includes the field 'Left1', but its
    type (left) is not compatible with the type of control (ASP.left_ascx).

    Source Error:

    Line 12: <form id="form1" runat="server">
    Line 13:
    Line 14: <uc1:left ID="Left1" runat="server" />
    Line 15:
    Line 16:

    The decleration of the custom control in that page is:
    <%@ Register Src="../left.ascx" TagName="left" TagPrefix="uc1" %>

    I was able to remove the error by deleting the Left1 declaration from the
    designer .cs file. I removed this line:

    protected global::left Left1;

    Errors happen on every custom control I put on the page.

    Why would the presence of the above line cause the parser error? Visual
    Studio created the decleration automatically when I dragged and dropped the
    ascx file into the aspx file.

    John Dalberg
     
    John Dalberg, Jan 7, 2007
    #1
    1. Advertising

  2. John Dalberg

    Guest

    , Feb 13, 2007
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Eric
    Replies:
    0
    Views:
    1,291
  2. Shalabh Chaturvedi
    Replies:
    2
    Views:
    447
    Mike C. Fletcher
    Feb 20, 2004
  3. Jimmy
    Replies:
    4
    Views:
    652
    Thomas Hawtin
    Aug 8, 2007
  4. Hicham Mouline
    Replies:
    1
    Views:
    601
    Victor Bazarov
    Apr 20, 2009
  5. Eric
    Replies:
    0
    Views:
    142
Loading...

Share This Page