The base class includes the field but its type is not compatible with the type of control.

D

Daniel Melo

I have been looking for the solution of this problem for several months and
I could not solve.

I will try to post something again :

Facts :

a) I have a custom web control derived from DataGrid. Its fullname is :
MyNameSpace.MyDataGrid.
b) I have a ancestor class called BasePage that is derived from
System.Web.UI.Page. All my web pages inherits from BasePage class.
c) In BasePage class there is field of MyNameSpace.MyDataGrid. Just like
this :

protected MyNameSpace.MyDataGrid datagrid;

d) I have a web page called default.aspx (derived from BasePage class) that
has an instance of MyDataGrid, just like :

<cc1:mydatagrid AutoGeneratoColumns="true" id="datagrid"></cc1:mydatagrid>
(some parameters not shown)

Note that the instance datagrid is already declared in the BasePage class,
so it is not declared on default.aspx.cs. (Default.aspx.cs inherits from
BasePage class).

Everything worked fine for several months, until some problem began to
happen :

Parser Error :
The base class includes the field 'datagrid' but its type
(MyNameSpace.MyDataGrid) is not compatible with the type of control
(MyNameSpace.MyDataGrid).

This error only occurs in random times. The application runs okeys, but in
some moments this error begin to occur in everypage that has an instance of
MyDataGrid. So, we restart the IIS and the application backs to normal. It
runs OK for several days until the this error come back.

We tracked the performance counters of the Web Server and we could not
notice any strange behavior that could lead to that.

I dont know what do anymore.

Any ideas are wellcome.

Thanks in Advance,

Daniel Melo
 

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

Top