XYZ is creating an e-commerce site for PremiumBoutique. The site is distributed across multiple servers in a Web farm. Users will be able to navigate through the pages of the site and select products for purchase. XYZ wants to use a DataSet object to save their selections. Users will be able to view their selections at any time by clicking a Shopping Cart link. XYZ wants to ensure that each user's shopping cart DataSet object is saved between requests when the user is making purchases on the site.
How can this requirement be implement?
Create a StateBag object. Use the StateBag object to store the DataSet object in the page's ViewState property
Use the HttpSessionState object returned by the Session property of the page to store the DataSet object. Use the Web.config file to configure an out-of-process session route
Use the Cache object returned by the page's Cache property to store a DataSet object for each user. Use an HttpCachePolicy object to set a timeout period for the cached data
Use the Session_Start event to create an Application variable of type DataSet for each session. Store the DataSet object in the Application variable