Cache DataSet

N

Nikhil Patel

Hi all,
If I want to access the contents of a DataSet in multiple ASP.Net form
requests without manually saving it in Cache, do I have to add the DataSet
to the form at design time or can I just declare it as Protected and the
Form will save its contents?

Thanks.
-Nikhil
 
H

Hans Kesting

Nikhil said:
Hi all,
If I want to access the contents of a DataSet in multiple ASP.Net
form requests without manually saving it in Cache, do I have to add
the DataSet to the form at design time or can I just declare it as
Protected and the Form will save its contents?

Thanks.
-Nikhil

Why not add it "manually"?

*if* it is possibly to "have the form save it", then it will be saved in ViewState,
meaning:
- the data will be sent-and-received (roundtrip!) with the html that goes to the browser
- other requests / pages / sessions will still need their own copy

viewstate has "postback scope", the browser needs to send it back to the server.
cache has application scope, every user can access the same data.

Hans Kesting
 

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,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top