Lab: ViewState Problems

Problem 1

Implement a simple program that uses viewstate to store and retrieve counter value. Whenever Increment button is clicked, counter should be incremented by 2. Write code behind below.

If this page is accessed using different browser windows, or from more than one clients, whether the counter value would be same, or it would be different at different time instants? Give reason for the observation.

Problem 2

Extend the program implemented above and make the View State secure. Refer to the textbook for the technique of securing.

Problem 3

Consider the following definition of customer class. Develop a web form that stores three objects of customer in viewstate. Implement the code for retrieving customer objects also.

Customer class definition:

VB.NET Customer Class Code
Web hosting by Somee.com