HttpResponseWrapper.AppendCookie(HttpCookie) 方法

定義

將 HTTP Cookie 加入至 HTTP 回應 Cookie 集合中。Adds an HTTP cookie to the HTTP response cookie collection.

public:
 override void AppendCookie(System::Web::HttpCookie ^ cookie);
public override void AppendCookie (System.Web.HttpCookie cookie);
override this.AppendCookie : System.Web.HttpCookie -> unit
Public Overrides Sub AppendCookie (cookie As HttpCookie)

參數

cookie
HttpCookie

要加入至回應的 Cookie。The cookie to add to the response.

例外狀況

Cookie 會在送出 HTTP 標頭之後加入。The cookie was added after the HTTP headers were sent.

適用於