J
John Walsch
Because I'm a beginner to ASP.NET, I may be not familiar with the way
each ASP.NET page is processed. In the books that I have read
(scanned), the purpose of DataSet is to keep your data in memory until
you decide to commit the changes. Ok, so I create and fill my DataSet
in the Page_Init section (I have tried in the Page_Load section as
well), and then later use one of the tables from the DataSet in the
DataGrid. But when I try to edit a row in the DataGrid (by pressing
the Edit link in the EditCommandColumn) a request is made back to the
server, thus reloading my page and reinitializing everything and
making a request to the database and FILLING my DataSet AGAIN. I mean
how is that different than just updating the database each time and
skipping few steps? Am I doing something wrong? From my understaning
it should reside in memory and not be reinitialized each time I make a
request to the page. What would I have to do in order to keep it in
memory and not reload it each time I make a request to the page? Would
I have to keep my DataSet object in the Session variable or something?
Thank you in advance.
each ASP.NET page is processed. In the books that I have read
(scanned), the purpose of DataSet is to keep your data in memory until
you decide to commit the changes. Ok, so I create and fill my DataSet
in the Page_Init section (I have tried in the Page_Load section as
well), and then later use one of the tables from the DataSet in the
DataGrid. But when I try to edit a row in the DataGrid (by pressing
the Edit link in the EditCommandColumn) a request is made back to the
server, thus reloading my page and reinitializing everything and
making a request to the database and FILLING my DataSet AGAIN. I mean
how is that different than just updating the database each time and
skipping few steps? Am I doing something wrong? From my understaning
it should reside in memory and not be reinitialized each time I make a
request to the page. What would I have to do in order to keep it in
memory and not reload it each time I make a request to the page? Would
I have to keep my DataSet object in the Session variable or something?
Thank you in advance.