Response.AddCookie("cookieName", "cookieValue");
HttpCookie myCookie = new HttpCookie("cookieName", "cookieValue"); myCookie.Expires = DateTime.Now.AddDays(1); Response.Cookies.Add(myCookie);This example creates a HttpCookie object with name "cookieName" and value "cookieValue" and sets the expiry date to one day from the current date. The cookie is then added to the response using the Response.Cookies.Add method. The package library for Response.AddCookie is System.Web.dll, which is part of the System.Web namespace. It is commonly used in ASP.NET applications.