Export (0) Print
Expand All

ConnectivityStatus::IsOffline Property

Gets or sets a value indicating whether an application is in offline mode.

Namespace:  System.Web.ClientServices
Assembly:  System.Web.Extensions (in System.Web.Extensions.dll)

public:
static property bool IsOffline {
	bool get ();
	void set (bool value);
}

Property Value

Type: System::Boolean
true if the application is in offline mode; otherwise, false.

When you set the IsOffline property, the ConnectivityStatus class caches the value to the local file system. The client service providers in the System.Web.ClientServices.Providers namespace check this value to determine whether to use the offline data cache instead of attempting to access the associated ASP.NET AJAX authentication, roles, and profile services.

The following example code demonstrates how to use this property to update the offline status depending on a check box value. In this example, a CheckedChanged event handler updates the offline status. If the user sets the application to the online state, the event handler attempts to revalidate the user. However, if the authentication server is unavailable, the event handler returns the application to the offline state.

No code example is currently available or this language may not be supported.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5

Community Additions

ADD
Show:
© 2014 Microsoft