ASP與ASP.NET在COOKIE方面的區(qū)別
發(fā)表時(shí)間:2024-01-30 來(lái)源:明輝站整理相關(guān)軟件相關(guān)文章人氣:
[摘要]//ASP.NET//讀Request.Cookies("test").value;//寫(xiě)var cookie : HttpCookie = new HttpCookie("test");cookie .value = "abc";Re...
//ASP.NET
//讀
Request.Cookies("test").value;
//寫(xiě)
var cookie : HttpCookie = new HttpCookie("test");
cookie .value = "abc";
Response.Cookies.Add(cookie );
//ASP
//讀
Request.Cookies("test");
//寫(xiě)
Response.Cookies("test") = "abc";
//若COOKIE為ASP創(chuàng)建,則在.NET中需用下列方法解碼,否則會(huì)有亂碼問(wèn)題
System.Web.HttpUtility.UrlDecode(c, System.Text.Encoding.Default);