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.
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.