共用方式為


ICookieManager.AppendResponseCookie 方法

定義

將指定的 Cookie 附加至回應。

public:
 void AppendResponseCookie(Microsoft::AspNetCore::Http::HttpContext ^ context, System::String ^ key, System::String ^ value, Microsoft::AspNetCore::Http::CookieOptions ^ options);
public void AppendResponseCookie (Microsoft.AspNetCore.Http.HttpContext context, string key, string value, Microsoft.AspNetCore.Http.CookieOptions options);
public void AppendResponseCookie (Microsoft.AspNetCore.Http.HttpContext context, string key, string? value, Microsoft.AspNetCore.Http.CookieOptions options);
abstract member AppendResponseCookie : Microsoft.AspNetCore.Http.HttpContext * string * string * Microsoft.AspNetCore.Http.CookieOptions -> unit
Public Sub AppendResponseCookie (context As HttpContext, key As String, value As String, options As CookieOptions)

參數

context
HttpContext
key
String
value
String
options
CookieOptions

適用於