about 6 years ago

其實這個問題很早以前就解決過,但是這次既然遇到了,就再記錄一下吧

//寫入cookie....
    Response.Cookies["Name"].value = Server.UrlEncode(Name);
  // Response.Cookies["Name"].value = HttpUtility.UrlEncode(Name);
  
  //讀出cookie 
  string Name = Server.UrlDecode(Request.Cookies["Name"].value;
  // string Name = HttpUtility.UrlDecode(Request.Cookies["Name"].value;