daily pastebin goal
17%
SHARE
TWEET

Untitled

a guest Jun 14th, 2018 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. CookieService.SetCookie(model.mipropiedad, "cookie1"); // se encarga de crear una cookie de nombre cookie1 con el dato que le paso desde mi modelo.
  2. CookieService.SetCookie(model.mipropiedad2, "cookie2");
  3.  
  4. Session["MiSession"] = model.mipropiedad3
  5.    
  6. public static void LogOut()
  7. {
  8.     var mivar = new HttpCookie("cookie1");
  9.     CookieSession.Expires = DateTime.Now.AddDays(-1);
  10.     CookieSession.Value = string.Empty;
  11.     HttpContext.Current.Response.Cookies.Add(mivar);
  12. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top