Partager via


Sys.Services AuthenticationService isLoggedIn Property

Gets the authentication state of the current user.

Note

To get or set property values for client API properties, you must call property accessor methods that are named with the get_ and set_ prefixes. For example, to get or set a value for a property such as cancel, you call the get_cancel or set_cancel methods.

Sys.Services.AuthenticationService.get_isLoggedIn();

Return Value

true if the current user is logged in; otherwise, false.

Remarks

The value of this property is set by the ScriptManager object during a page request.

Example

The following example shows how to use the isLoggedIn property to check whether a user is authenticated. This code is part of a complete example found in the Sys.Services.AuthenticationService class overview.

    var userLoggedIn =
        Sys.Services.AuthenticationService.get_isLoggedIn();

See Also

Concepts

Sys.Services.ProfileService Class

Sys.Net.WebServiceProxy Class