-
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
-
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
-
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 :D :D :D
-
No Problem
I'm still learning this .net thing and I'm having so much fun
Later