Self Instruction

When creating the order status page, we kept some optimization techniques in mind. This page pulls all the data that is needed in a single database call by using a DataSet. Now to really take advantage, you can cache the dataset that contains the orders by putting it into the session.

First, create a private method called GetOrders in the OrderStatus.aspx.cs page. Make this method responsible for calling MyGolfGearDP to retrieve the orders and populate the dataset. Then insert that dataset into the session so that whenever the page is loaded, it calls this method to get the orders. It first looks in the session for the DataSet. If the DataSet is not in the session, it calls the data provider, populates the DataSet, and then inserts ...

Get Building e-Commerce Sites with the .NET Framework now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.