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?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…