ESRI.ArcGIS.ADF.Web.UI.WebControls
CallbackResultCollection Class
Members  See Also  Send Feedback
ESRI.ArcGIS.ADF.Web.UI.WebControls Namespace : CallbackResultCollection Class




A collection of CallbackResult objects. Used for returning information to the client from a callback.

Object Model

CallbackResultCollection Class

Syntax

Visual Basic (Declaration) 
<SerializableAttribute()>
Public Class CallbackResultCollection 
   Inherits System.Collections.Generic.List(Of CallbackResult)
Visual Basic (Usage)Copy Code
Dim instance As CallbackResultCollection
C# 
[SerializableAttribute()]
public class CallbackResultCollection : System.Collections.Generic.List<CallbackResult> 

Remarks

A CallbackResultCollection enables ESRI Web ADF controls to pass information back to the client as a result of the callback. ESRI Web ADF controls maintain a CallbackResultCollection in their CallbackResults property. See that property and the CallbackResult class for more discussion on using callback results.

Use the CallbackResultsCollection.CopyFrom method to add callback results to the collection. CopyFrom calls List. Add for each item which basically adds the item to the end of the collection. Note, the base class for CallbackResultCollection defines the AddRange method. The AddRange method uses List.Copy or List.CopyTo to add items to the end of the collection. Both methods append items to the end of a collection and the initial order of callback results in the collection is the same. However, the ID of the callback results appended to the collection is different, which affects their priority and order in which they are processed. CopyFrom changes the ID of the callback result to be in sequence with the collection; AddRange does not, it keeps the original ids. Note if two callback results are equal (control id and parameters) they will share the same id. When the collection is deserialized to a string and processed on the client (using JavaScript) the order is changed. Callback results are sorted and the ID is used to determine precedence. The higher the id, the higher the precedence (assuming Priority is the same), the further the callback result is pushed to the end of the collection. This established a pattern for appending callback results to a collection, use CopyFrom. If using AddRange, the order of callback results may differ from the order in which they were added. The CopyFrom method will respect the order and thus precedence of callback results in a collection.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2011 All Rights Reserved.