Results 1 to 4 of 4

Thread: ASP.Net

  1. #1

    Thread Starter
    Member
    Join Date
    Aug 2001
    Location
    nr Manchester, England
    Posts
    34

    Question ASP.Net

    Hi,

    I've created an ASP.Net page complete with a datagrid.

    The data is loaded into the grid via a dataset (containing all the requested data).

    My problem is that I wish to only declare an object (the one that holds the dataset) once when the page is loaded.

    Unfortunately, wherever the object is declared, when the page reloads it re-declares the object, so destroying any data.

    I don't wish to reload the dataset each time I want to use the pager (causing page reload). Is there any way to do this, other than only loading a page at a time into the dataset????

    Many thanks in advance...

    Rob

  2. #2
    Frenzied Member DevGrp's Avatar
    Join Date
    Nov 2001
    Location
    Charlotte, NC
    Posts
    1,256

    Smile

    Hi,

    why dont you try to declare the object in a separate class/file with the data already requested, then when the page loads the first time you can request that data and update the page.

    Basically what you want to do is declare and instatiate the object in a separate then refer to it whenever you want it.

    Let me know if that helps, since I'm also new to vb.net.


    later

    Pierre
    Dont gain the world and lose your soul

  3. #3

    Thread Starter
    Member
    Join Date
    Aug 2001
    Location
    nr Manchester, England
    Posts
    34
    Yes, I think that worked.

    I've added a dataset object to a repository class we had already created to hold user data.

    This is maintained when the grid is initially loaded. The page function simple uses the repository dataset to load the next page.

    I was hoping to be able to declare an object within the page only once (not each time the page re-loads) but I guess this must not be possible.

    Thanks Pierre

  4. #4
    Frenzied Member DevGrp's Avatar
    Join Date
    Nov 2001
    Location
    Charlotte, NC
    Posts
    1,256

    Smile

    No Problem

    I'm still learning this .net thing and I'm having so much fun

    Later
    Dont gain the world and lose your soul

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width