SessionStateUtility.IsSessionStateRequired(HttpContext) 方法

定義

取得值,這個值指出指定 HttpContext 的工作階段狀態是否為必要的。Gets a value which indicates whether the session state is required for the specified HttpContext.

public:
 static bool IsSessionStateRequired(System::Web::HttpContext ^ context);
public static bool IsSessionStateRequired (System.Web.HttpContext context);
static member IsSessionStateRequired : System.Web.HttpContext -> bool
Public Shared Function IsSessionStateRequired (context As HttpContext) As Boolean

參數

context
HttpContext

指定要檢查的 HttpContextSpecifies the HttpContext to check.

傳回

Boolean

如果工作階段狀態是必要的,則為 true;否則為 falsetrue if the session state is required; otherwise, false.

適用於