Frequently Asked Interview Questions

How can you create in memory cookies?

Below code demonstrates how to create and add in memory cookies.

//Create a Cookie:
HttpCookie myCookie = new HttpCookie(“UserId” , “xyz”);
//Add Cookie to Response using Add method, shown below.
Response.Cookies.Add(myCookie);

Most Visited Pages

Home | Site Index | Contact Us