Page.IsClientScriptBlockRegistered Method (String)

 
Note: This API is now obsolete.

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

Namespace:   System.Web.UI
Assembly:  System.Web (in System.Web.dll)

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

Parameters

key
Type: System.String

The string key of the client script to search for.

Return Value

Type: System.Boolean

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

Call this method before calling Page.RegisterClientScriptBlock 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 IsClientScriptBlockRegistered method has been deprecated. Use the IsClientScriptBlockRegistered method in the ClientScriptManager class.

The following code example demonstrates the use of the RegisterClientScriptBlock method in conjunction with the IsClientScriptBlockRegistered method. If the ECMAScript written in the code declaration block has not already been registered, as determined by IsClientScriptBlockRegistered, then a RegisterClientScriptBlock call is made.

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

.NET Framework
Available since 1.1
Return to top
Show: