By Zach Dwight, GIS Programmer, Yakima, WA
Code Summary
VERY simple code snippet that allows you to create four buttons that move nodes (server or layer) up or down one index within the TOC control of a web application. I created four button events:
-Move Server Node Up
-Move Server Node Down
-Move Layer Node UP
-Move Layer Node Down
Simple? Simpler than it looks even. Modify it and spice it up with some graphics. In my case, I use the checked property to identify the node that should be moved. Pic included and error handling.

February 5, 2007 at 11:23 am
I recently updated the script so that the layers will move and update the toc and map to match the changes made using a callback.
December 2, 2007 at 8:36 pm
Hi Zach,
I had an attempt in trying to get your sample to work, however, at run time after I’ve clicked the Up button, the following line falls over:
‘Grab selected layer index stored in hidden field
Dim field As HiddenField = info.Toolbar.FindControl(“Layer”)
I am uncertain whether your download contains all the necessary controls/components to get the sample to work. Would you be able to submit/post a sample webapp so we can see the whole picture of how your tools work?
Thanks for the original post and your assistance.
Cheers,
Jack
April 29, 2008 at 2:09 am
Hi,
i have the same problem, could you help me please?
Regards