public static void RegisterArrayDeclaration(Control control, string arrayName, string arrayValue) { if (control == null) { throw new ArgumentNullException("control"); } if (control.Page == null) { throw new ArgumentException(AtlasWeb.ScriptRegistrationManager_ControlNotOnPage, "control"); } control.Page.ClientScript.RegisterArrayDeclaration(arrayName, arrayValue); ScriptManager sm = ScriptManager.GetCurrent(control.Page); if (sm != null) { RegisteredArrayDeclaration entry = new RegisteredArrayDeclaration(control, arrayName, arrayValue); sm.ScriptRegistration.ScriptArrays.Add(entry); } }