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

J

John Dalberg

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,734
Messages
2,569,441
Members
44,832
Latest member
GlennSmall

Latest Threads

Top