Creating Cookies
You create a new cookie by adding a cookie to the Response.Cookies
collection, which contains all the cookies sent from the web server to the web browser. For example, the page in Listing 28.1 enables you to create a new cookie named Message
. The page contains a form that enables you to enter the value of the Message
cookie (see Figure 28.1).
Figure 28.1. Creating a new cookie.
Listing 28.1. SetCookie.aspx
Be warned that cookie ...
Get ASP.NET 4 Unleashed 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.