Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0ObjectDataSource canObjectDataSource can't see business objects in app_code
Previous
 
Next
New Post
2/9/2006 1:23 PM
 

Ok, here's a strange one.

If I do the following:

1. Create a simple web site
2. Create a business object in app_code
3. Make a new page
4. Add an ObjectDataSource to the page

...then everything is fine and the ObjectDataSource shows the business object as a choice in the dropdown.

HOWEVER....

If I create a business object (even a simple one) in app_code in a DotNetNuke project then none of the ObjectDataSource controls can see this class.

Why?

 

 
New Post
2/10/2006 1:03 PM
 

Am I correct in my assumption that this is a bug in VS2005? Or is there something going on in the DNN project structure that makes this not work?

Has anyone else had this problem?

 
New Post
3/29/2006 8:02 AM
 
Any news on this? Have the exact same problem and have been trying EVERYTHING to solve it, still no luck at all. In a freshly created web project it works like a dream, so there must be something with settings in the DotNetNuke.

/pJ
 
New Post
4/6/2006 7:53 AM
 

Here's a little trick I've been using...

Switch to the source view of your ascx.  Paste the following code into your markup and change the ID, SelectMethod and TypeName fields as desired:

<asp:ObjectDataSource
    id="ObjectDataSource1"
    runat="server"
    SelectMethod="YourSelectMethod"
    TypeName="YourNamespace.YourBusinessObjectName">
</asp:ObjectDataSource>

Then switch back to the designer view, and use the smart tag on the ObjectDataSource to configure your data source.  The fields will now be filled in.  When you get to the screen to define your select, update, insert, delete methods, you will see choices from your business object in the list.  Not as elegant as doing it all with the wizard, but lets you use a great control and avoid doing it in the code-behind.

 
New Post
4/6/2006 8:17 AM
 

I would say that this is a bug, because even when you designate the class with the <DataObject> attribute it still doesn't see classes in there.

But if you put the object manually, doing the configuration manually in code (like yancer has shown you) it works like a charm, and the objectdatasource shows and binds the data correctly.

 

 


Thanks,
Vladan Strigo
NETMedia

My website: Vladan.Strigo.NET

Vladan.Strigo.NET: Projects
* Advanced VS2005 development approach - BlankModule
* DNN & Microsoft Ajax best practices guidance

Vladan.Strigo.NET: Resources
* Comprehensive list of DNN 4 Module development resources

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0ObjectDataSource canObjectDataSource can't see business objects in app_code


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out