且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何使用ScriptManager.RegisterArrayDeclaration用新数组替换数组

更新时间:2023-12-05 13:12:28

根据微软没有办法替换 - 只能添加......

According to Microsoft there is no way to replace - only to add...
引用:

RegisterArrayDeclaration检查是否存在与arrayName参数中指定的名称相同的已注册数组,如果存在,则添加arrayValue参数中指定的值。由于底层存储机制基于ArrayList,因此允许重复。如果不存在与arrayName参数同名的已注册数组,则会创建它并添加arrayValue参数中的值。

The RegisterArrayDeclaration checks to see whether a registered array exists with the same name as the name specified in the arrayName parameter and, if so, adds the values specified in the arrayValue parameter. Because the underlying storage mechanism is based on an ArrayList, duplicates are allowed. If a registered array with the same name as the arrayName parameter does not exist, it is created and the values in the arrayValue parameter added to it.



http://msdn.microsoft.com/en-us/library/system .web.ui.clientscriptmanager.registerarraydeclaration(v = vs.110).aspx [ ^ ]