Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 5 of 5

Thread: Using Custom ObjectDataSource

  1. #1
    ltbaggz is offline Junior Member
    Join Date
    Mar 2009
    Posts
    21

    Default Using Custom ObjectDataSource

    I just have a quick question, I am trying to make use of some custom forms using a gridview bound to a objectdatasource for a class that interfaces with some custom tables we added to the ASPDNSF database. I have the forms working in a stand alone website and can go through the gridview and bind it to the class methods but when I try to use the same logic in the ASPDNSF admin section, i cannot seem to get the methods to populate when going through creating a datasourceobject. The only thing I see is the all of the default ASPDNSF classes.

    Does anyone have an idea what I can do to get this working?

    Thanks,
    Drew

  2. #2
    George the Great is offline Senior Member
    Join Date
    Nov 2006
    Location
    Cleveland, OH
    Posts
    1,792

    Default

    You'll probably have to post some of your code here to determine what's going on. It could be any number of things from namespace mis-matches or clashes, to an error in the logic, to just having the code in the wrong place, etc... Have you tried attaching Visual Studio debugger to the site and stepping through your code?
    <a href="http://www.aspdotnetstorefront.com">Shopping Cart Software</a>

  3. #3
    ltbaggz is offline Junior Member
    Join Date
    Mar 2009
    Posts
    21

    Default

    Code:
    [DataObject(true)]
    public class MyClass
    {
    
        [DataObjectMethod(DataObjectMethodType.Select, true)]
        public static DataTable GetList()
        {
    
        }
    
    }
    Everything compiles and runs but I am trying to get this object and method to come up in the objectdatasource wizard for attaching to a gridview but am only getting the default aspdnsf methods and objects. I have tried this on a stand alone site and it works fine. Any ideas what in the aspdsnf is blocking it?

    Thanks,
    Drew

  4. #4
    DanV's Avatar
    DanV is offline Ursus arctos horribilis
    Join Date
    Apr 2006
    Posts
    1,568

    Default

    We wouldn't "block" anything like this. My guess is either your assemblies are compiling to the wrong location (SLN file not set up correctly), your namespaces are set wrong, or you are missing a reference to your assembly/file.

  5. #5
    suedeapple is offline Member
    Join Date
    Aug 2010
    Posts
    30

    Default

    Im having the exact same problem.

    I create a new .cs file, create a new function which returns a simple dataset, save the file in the app_code folder.

    If then attempt to create a objectdatasource control, the class isnt in the dropdownlist in the wizard.

    If I try and do it via codebehind, then the class is there in intellisense.

    If i try and code the objectdatasource control manually, when I upload and run the page i get an "out of memory exception"

    odd! - please help