摘要:
publicstaticvoidSetCookie(Stringkey,Stringvalue,TimeSpan?expires){StringBuildercookie=newStringBuilder();cookie.Append(String.Concat(key,"=",value));if(expires.HasValue){DateTimeexpire=DateTime.UtcNow+expires.Value;cookie.Append(String.Concat(";expires=",expire.ToString("R&q 阅读全文