Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / April 2008

Tip: Looking for answers? Try searching our database.

Problem with Objectdatasource and project less solution.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Prasanta - 30 Apr 2008 09:40 GMT
Hello,

I have a project less solution asp.net 2.0 with c#. I have a method in
page code behind which returns a datatable, that method I want to
assign in the objectdatasource select method, but when ever I am
passing the typename in objectdatasource with the class name its
saying couldn't find the type. but if the solution is not projectless
same code is working fine, is there anything extra need to be done on
the page or objectdatasource.

Cheers,
PB
Stan - 30 Apr 2008 15:02 GMT
> Hello,
>
[quoted text clipped - 8 lines]
> Cheers,
> PB

Really the code for the ObjectDataSource select, update, delete,
insert methods should be contained in a separate class file in the
App_Code folder. When the ObjectDataSource executes these methods it
creates an instance of the class. If the code for these methods is
within the page code-behind then merely assigning the method names to
the ObjectDataSource will not work because it will expect a class name
reference.

You don't need a host project to do this. It works perfectly well
within a single web-site in the solution.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.