This documentation is archived and is not being maintained.

ClientScriptManager.IsStartupScriptRegistered Method (String)

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

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

public bool IsStartupScriptRegistered (
	string key
public boolean IsStartupScriptRegistered (
	String key
public function IsStartupScriptRegistered (
	key : String
) : boolean
Not applicable.



The key of the startup script to search for.

Return Value

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

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

A startup script 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 string key and a type parameter with the type set as a Page object

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0