Documentation for: ASP.NET Ajax Version 1.0

This documentation is for a previous version. For the current released version, see the ASP.NET Ajax documentation on MSDN.

 

 

 

 

 

 

 

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.

Syntax

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.

javascript

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