M
mrajanikrishna
Hi friends,
I have placed a GridView and its DataSourceId is
ObjectDaatSource1.
<asp:ObjectDataSource id="ObjectDataSource1" runat=server
TypeName="AuthorsDb" SelectMethod="GetStates"/>
My page name is dataaccess2.aspx
Cant I declare a type (AuthorsDb) in codebehind file or cant I
directly give the dataaccess2 class as the TypeName for
ObjectDataSource?
When I write the code(AuthorsDb) at the end of public partial class
dataaccess2 : System.Web.UI.Page
{
}
Its compiling well but has rntime error "Type specified in the
TypeName property of objectdatasource "ObjectDataSource1" not found.
When I create a separate class "AuthorsDb.cs" and run, its executing.
Cant I use codebehind for the ObjectDataSource?
Thanks in advance.
I have placed a GridView and its DataSourceId is
ObjectDaatSource1.
<asp:ObjectDataSource id="ObjectDataSource1" runat=server
TypeName="AuthorsDb" SelectMethod="GetStates"/>
My page name is dataaccess2.aspx
Cant I declare a type (AuthorsDb) in codebehind file or cant I
directly give the dataaccess2 class as the TypeName for
ObjectDataSource?
When I write the code(AuthorsDb) at the end of public partial class
dataaccess2 : System.Web.UI.Page
{
}
Its compiling well but has rntime error "Type specified in the
TypeName property of objectdatasource "ObjectDataSource1" not found.
When I create a separate class "AuthorsDb.cs" and run, its executing.
Cant I use codebehind for the ObjectDataSource?
Thanks in advance.