G
Guest
This may seem a little silly but please bear with me...
I have a page called Page1.aspx and a code behind Page1.aspx.cs. In the
code behind I declare a class called OdsDataSource as a CHILD class of the
Page1 class, thus its full name is MyNamespace.Page1.OdsDataSource.
On the page I have an objectdatasource control with
TypeName="MyNamespace.Page1.OdsDataSource" when the page runs I get an error
saying that the ODS can't find the type specified for TypeName.
If I move this class out into the App_Code folder (therefore making it
MyNamespace.OdsDataSource) everything works fine. But if the class is
declared in my code-behind the ODS can't seem to find it.
I am suspicious that this has something to do with the web site compilation
model but I'm not sure.
How can I get the ODS to find a type declared in the code-behind?
p.s. Interestingly, if I set the ODS to use the page's type
(MyNamespace.Page1) it says it can't find that either, even though the page
is derived from it!! What is going on?
I have a page called Page1.aspx and a code behind Page1.aspx.cs. In the
code behind I declare a class called OdsDataSource as a CHILD class of the
Page1 class, thus its full name is MyNamespace.Page1.OdsDataSource.
On the page I have an objectdatasource control with
TypeName="MyNamespace.Page1.OdsDataSource" when the page runs I get an error
saying that the ODS can't find the type specified for TypeName.
If I move this class out into the App_Code folder (therefore making it
MyNamespace.OdsDataSource) everything works fine. But if the class is
declared in my code-behind the ODS can't seem to find it.
I am suspicious that this has something to do with the web site compilation
model but I'm not sure.
How can I get the ODS to find a type declared in the code-behind?
p.s. Interestingly, if I set the ODS to use the page's type
(MyNamespace.Page1) it says it can't find that either, even though the page
is derived from it!! What is going on?