System.Web.UI.Page.IsClientScriptBlockRegistered Method

Determines whether the client script block with the specified key is registered with the page.

Syntax

[System.Obsolete]
public bool IsClientScriptBlockRegistered (string key)

Parameters

key
The string key of the client script to search for.

Returns

true if the script block is registered; otherwise, false.

Remarks

Call this method before calling Page.RegisterClientScriptBlock(string, string) to avoid unnecessarily assembling the client-side script. This is particularly important if the script requires a large amount of server resources to create.

The Page.IsClientScriptBlockRegistered(string) method has been deprecated. Use the erload:System.Web.UI.ClientScriptManager.IsClientScriptBlockRegistered method in the System.Web.UI.ClientScriptManager class.

Requirements

Namespace: System.Web.UI
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0