ESRI.ArcGIS.ADF.Web.UI.WebControls | |
Refresh Method | |
See Also |
ESRI.ArcGIS.ADF.Web.UI.WebControls Namespace > Toc Class : Refresh Method |
Visual Basic (Declaration) | |
---|---|
Public Overrides Sub Refresh() |
Visual Basic (Usage) | Copy Code |
---|---|
|
C# | |
---|---|
public override void Refresh() |
Use this method if the contents or properties of the Map have changed and the Toc needs to be refreshed. The Toc does not automatically get refreshed during a client callback. For example, if a custom tool turns a layer off on the Map, the callback is being performed by the Map. The Toc is not part of the callback, and so will not be refreshed and updated on the browser. To update the Toc in this case, use code such as:
Toc1.Refresh();
Map1.CallbackResults.CopyFrom(Toc1.CallbackResults);
This will refresh the Toc and copy its results to the Map control doing the callback, which will cause the Toc to update on the client.