Home »
MCQs »
ASP.Net MCQs
Which of the following property is used to set the cookie's expiration date and time in ASP.NET?
97. Which of the following property is used to set the cookie's expiration date and time in ASP.NET?
- Response.Cookies ["mycookie"].ExpiresDateTime
- Response.Cookies ["mycookie"].Expires
- Response.Cookies ["mycookie"].ExpiresTime
- Response.Cookies ["mycookie"].RemoveDateTime
Answer: B) Response.Cookies["mycookie"].Expires
Explanation:
The "Response.Cookies["mycookie"].Expires" property is used to set the cookie's expiration date and time in ASP.NET.