In ASP.NET MVC 5 I had the following extension:
public static ActionResult Alert(this ActionResult result, String text) {
HttpCookie cookie = new HttpCookie("alert") { Path = "/", Value = text };
HttpContext.Current.Response.Cookies.Add(cookie);
return result;
}
Basically I am adding a cookie with a text.
In ASP.NET Core I can't find a way to create the HttpCookie
. Is this no longer possible?