System.Web.UI.Page.IsStartupScriptRegistered Method

Determines whether the client startup script is registered with the System.Web.UI.Page object.

Syntax

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

Parameters

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

Returns

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

Remarks

Call this method before calling Page.RegisterStartupScript(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.IsStartupScriptRegistered(string) method has been deprecated. Use the erload:System.Web.UI.ClientScriptManager.IsStartupScriptRegistered 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