📜  检查 cookie mvc - 任何代码示例

📅  最后修改于: 2022-03-11 14:55:32.449000             🧑  作者: Mango

代码示例1
public static int CookiesReturn()
 {
   HttpCookie cookie =HttpContext.Current.Response.Cookies["userName"];
   if (cookie  != null)
   string username = Server.HtmlEncode(cookie.Value);
  }