- Understanding How Web Forms Are Processed
- Performing Basic State Management in Web Applications
- Using Cookies
- Using Hidden Fields and Query Strings
- Working with the Session Object
- Working with the Application Object
- Setting Up Global Objects with the global.asax File
- Configuring the Application
The workshop provides quiz questions to help you solidify your understanding of the material covered today as well as exercises to give you experience using what you have learned. Try to understand the quiz and exercise before continuing to tomorrow's lesson. Answers are provided in Appendix A, "Answers to Quizzes and Exercises."
1. What is a postback, and when is it used in ASP.NET Web forms?
2. Where are cookies stored, and what kinds of data can they contain?
3. Why would you store an object in Application state instead of
4. How do you change the timeout for a Session object?
5. What events does the HttpSession class support?
6. What file do you use to handle Session and Application events?
7. What tag do you use to declare an object in the global.asax file?
8. What file do you use to configure a Web application?
9. What method do the .NET collection classes use to return thread-safe versions of themselves?
Create a new Web service using Visual Studio. What files did Visual Studio create that we didn't in today's examples?
Add a method called Clear to the MyClass.vb application. How can you ensure that the method is thread-safe?
Create a two-page Web application that allows a user to log on and then select her favorite football team. Save the user's response in a cookie so that subsequent uses of the application will remember the user's preference.