sync.cookie.cs 1001 B

123456789101112131415161718192021222324252627282930313233
  1. using BizCom;
  2. using System;
  3. using System.Web;
  4. namespace SiteCore.Handler
  5. {
  6. public partial class sync
  7. {
  8. public void file_downback()
  9. {
  10. if (UrlPostParmsCheck("st"))
  11. {
  12. int st = GetPostInt("st");
  13. string msg = GetPostString("msg");
  14. if (st == 1)
  15. {
  16. HttpCookie cookie = new HttpCookie("erp_db_cookie");
  17. //cookie.Values.Clear();
  18. cookie.Values.Add("fileDownload", "true");
  19. cookie.Path = "/";
  20. //cookie.Domain = "47.114.150.226";
  21. cookie.Expires = DateTime.Now.AddDays(7);
  22. HttpContext.Current.Response.Cookies.Add(cookie);
  23. con.Response.AddHeader("Set-Cookie", "fileDownload=true; path=/");
  24. XLog.SaveLog(0, "有处理cookie");
  25. }
  26. con.Response.Write("1");
  27. }
  28. }
  29. }
  30. }