Best method to get data once when session or application starts

G

Guest

What is the best method to get data from the database once and use it on
several pages of a web site?

In ASP.NET 1.1 I would populate a Dataset in the Global.asax and save it to
a Session or Application variable. I would then use that Dataset for drop
down lists used on various web pages. This would limit hits against the
database server for data that almost never changes. If it did change I could
force the session or application to reset and force it to rebuild the dataset.

I figured out how in VS 2005 how to add a dataset to the appcode and use it
to fill a Dataset in the Global.asax. What I am not sure of is how to refer
to the dataset in the web pages. I have used the SqlDataSource, but see no
way from the web controls to reference a DataSet.
 

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,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top