Need some ideas to selectively fetch data via object data source or cache...

S

Siva

Hi,
I have a 3 tier ASP.Net app for a handheld which needs to fetch
orders from database via a DAL and populate it in a gridview using
objectdatasource. In the search page I have a few parameters and when
the search button is clicked I am sending those parameters via query
string ( I need to do this since my app will run in a handheld which
has certain restrictions). In the order list page, I am passing those
parameters to the DAL as queryparameters. Once I fetch the data from
DAL, I am populating the data on the datagrid.
Now, once the data is displayed, when the user selects a row I am
pointing them to a separate "edit" page, where they can edit several
fields corresponding to that row (not all of them will be displayed in
the gridview, so gridview in place editing can not be done) and when
the user hits save, I need to pass those values back to the "order
list" page where the gridview is displayed. Now once they redirected
back to the gridview page, I dont want the object data source to fetch
the data again from database but use the data already I am caching in
that page. Is this even possible? Since we have everything done
declaratively, how do I even selectively bind the gridview to the
cached data in one case vs. getting the data from database in the other
case.
I know, instead of decalratively adding parameters , I can also add
them in the page _load using ObjectDataSource1.SelectParameters.Add.
But how do I let the code to get the data from database in one case and
let the data from cache bind back to the gridview in the other case?
Any help would be very much appreciated.
Thanks
-Siva
 
J

Jeff Dillon

Rebind. What if you have a concurrency violation? Let the backend handle
that, and take the db hit again

Jeff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top