Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

ClientScriptManager.IsClientScriptIncludeRegistered Method (String)

Determines whether the client script include is registered with the Page object using the specified key.

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

public bool IsClientScriptIncludeRegistered(
	string key


Type: System.String

The key of the client script include to search for.

Return Value

Type: System.Boolean
true if the client script include is registered; otherwise, false.

Call this method before calling the RegisterClientScriptInclude method to avoid registering duplicate scripts. This is particularly important if the script requires a large amount of server resources to create.

A client script include is uniquely identified by its key and its type. Scripts with the same key and type are considered duplicates.

This overload of the IsStartupScriptRegistered method calls the overload that takes both a key and a type parameter with the type set as a Page object.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0
© 2015 Microsoft