System.Web.HttpResponse.SetCookie C# (CSharp) Method

SetCookie() public method

public SetCookie ( System.Web.HttpCookie cookie ) : void
cookie System.Web.HttpCookie
return void
		public void SetCookie (HttpCookie cookie)
		{
			AppendCookie (cookie);
		}

Usage Example

示例#1
0
 /// <summary>
 /// Copy cookies from the inbound response to the outbound response
 /// </summary>
 /// <param name="source">Reply from the intended destination</param>
 /// <param name="destination">response being sent back to the ajax request</param>
 public static void CopyCookiesTo(this HttpWebResponse source, HttpResponse destination)
 {
     foreach (HttpCookie cookie in source.Cookies)
     {
         destination.SetCookie(new HttpCookie(cookie.Name, cookie.Value));
     }
 }
All Usage Examples Of System.Web.HttpResponse::SetCookie