Page::RegisterArrayDeclaration Method (String^, String^)
Declares a value that is declared as an ECMAScript array declaration when the page is rendered.
Assembly: System.Web (in System.Web.dll)
public: [ObsoleteAttribute("The recommended alternative is ClientScript.RegisterArrayDeclaration(string arrayName, string arrayValue). http://go.microsoft.com/fwlink/?linkid=14202")] void RegisterArrayDeclaration( String^ arrayName, String^ arrayValue )
Parameters
- arrayName
-
Type:
System::String^
The name of the array in which to declare the value.
- arrayValue
-
Type:
System::String^
The value to place in the array.
This method can be used by script-based controls to declare themselves within an array so that a client script library can work with all the controls of the same type.
The RegisterArrayDeclaration method has been deprecated. Use the RegisterArrayDeclaration method in the ClientScriptManager class.
The following code example uses the RegisterArrayDeclaration method to declare an array, myArray, that contains three objects named x, y, and z. The example defines and registers a startup script using the RegisterStartupScript method. When the ECMAScript doClick function is called from the page that contains this code, the array and its objects are initialized.
Available since 1.1