Cannot use ObjectDataSource

Posts   
 
    
Gianc1412
User
Posts: 40
Joined: 30-Oct-2007
# Posted on: 08-Jan-2008 04:53:37   

I have the latest version of LLBLGEN PRO I have a VS2005 SP 0.5 I'm developing an AjaxEnabledWebApplication I generated self-servicing code to the root directory and namespace Restaurant

I created a simple object below

namespace Restaurant { public class MenuCategory { public MenuCategory() {

    }
    public static void GetAllMenuCategories()
    {
        MenuCategoryCollection cat = new MenuCategoryCollection();
        cat.GetMulti(null);
        return cat;
    }
}

}

I cannot see this class or method in the Business Object Dropdown for the ObjectDataSource control.

Any idea why?

Walaa avatar
Walaa
Support Team
Posts: 14951
Joined: 21-Aug-2005
# Posted on: 08-Jan-2008 10:18:14   

Are you posting real code? The method return type is void, is this correct?

Anyway, I think you should use DataObject Attributes for the class and the methods to be able to use them in the V.S. Designer, otherwise you can manually specify them in the aspx markup, please check the following link: http://msdn2.microsoft.com/en-us/library/ms227436.aspx

Gianc1412
User
Posts: 40
Joined: 30-Oct-2007
# Posted on: 08-Jan-2008 15:51:03   

Yes thats the real code I changed the return type but the instructions in the MSDN link is what fixed this problem for me. Thanks!