There is no such feature in .net. You have to create your own implementation. the logic steps, from my point of view, the logic steps would be:
- Create DIV with your product recall in it
- Make the DIV invisible by default
- Check for the cookie
- If the cookie doesn't exist display the product recall and create the cookie with the session ID and date.
- If the cookie exist check if the current session ID and the one in the cookie matches
- If they don't match display the product recall and update the cookie with the session ID and date.
- If they match check if the difference between the current time and date and the cookie date is bigger that the value you want to control. if so, display the product recall and update the cookie with the session ID and date.
To create cookies
HttpCookie myCookie = new HttpCookie("UserSettings");
myCookie["Session"] = Session.SessionID;
myCookie.Expires = DateTime.Now.AddDays(1d);
Response.Cookies.Add(myCookie)
To read cookies
if (Request.Cookies["UserSettings"] != null)
{
string userSettings;
if (Request.Cookies["UserSettings"]["Session"] != null)
{
userSettings = Request.Cookies["UserSettings"]["Session"];
}
}