In ASP.NET MVC 5 Ich hatte die folgende Erweiterung:Cookie mit ASP.NET Core-
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;
}
Grundsätzlich Ich füge ein Cookie mit einem Text.
In ASP.NET Core kann ich keinen Weg finden, den HttpCookie zu erstellen.
Ist das nicht möglich?
Mögliche Duplikat [Plätzchen in ASP.NET Core-RC2] (http://stackoverflow.com/questions/37958343/cookies-in-asp-net-core-rc2) –
Mögliches Duplikat von [Cookies und ASP.NET Core] (https://stackoverflow.com/questions/36166075/cookies-and-asp-net-core) –