<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.esri.com/Dev/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Using ASP.NET AJAX with the Web ADF</title><link>http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2007/04/02/Using-ASP.NET-AJAX-with-the-Web-ADF.aspx</link><description>Bryan Baker of the .NET SDK team wrote this great article on integration ASP.NET AJAX with the Web ADF. Microsoft's new ASP.NET AJAX enables developers to refresh portions of a Web page in a relatively simple way. To enable a control to use AJAX, the</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Debug Build: 61120.2)</generator><item><title>re: Using ASP.NET AJAX with the Web ADF</title><link>http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2007/04/02/Using-ASP.NET-AJAX-with-the-Web-ADF.aspx#168</link><pubDate>Mon, 02 Apr 2007 22:07:40 GMT</pubDate><guid isPermaLink="false">b60b3f0a-e2bd-4be5-8a18-822c697649ab:168</guid><dc:creator>David</dc:creator><description>We have noticed that if you place an OverView map control on the page and wire it up, all Ajax partial post-backs take a very long time to occur (15+ seconds).  This only occurs with the OverView map control.
Plus, the partial postbacks really begin to slow down anyway once you add a lot of controls, in our case ESRI ADF controls to the page outside of UpdatePanels.</description></item><item><title>Using ASP.NET AJAX with the Web ADF via ScriptManager</title><link>http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2007/04/02/Using-ASP.NET-AJAX-with-the-Web-ADF.aspx#170</link><pubDate>Wed, 04 Apr 2007 04:01:27 GMT</pubDate><guid isPermaLink="false">b60b3f0a-e2bd-4be5-8a18-822c697649ab:170</guid><dc:creator>Community Blogs</dc:creator><description>&lt;p&gt;On the ArcGIS server development blog you&amp;amp;rsquo;ll find a much waited post; how to use ASP.NET AJAX and&lt;/p&gt;
</description></item><item><title>Updating associated Web ADF controls</title><link>http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2007/04/02/Using-ASP.NET-AJAX-with-the-Web-ADF.aspx#171</link><pubDate>Wed, 04 Apr 2007 17:47:58 GMT</pubDate><guid isPermaLink="false">b60b3f0a-e2bd-4be5-8a18-822c697649ab:171</guid><dc:creator /><description>&lt;p&gt;A follow-up to my post: in the AJAX partial postback, you may need to tell other Web ADF controls to synch up with the Map. For instance, if you have an OverviewMap control that displays the Map's extent, you need to refresh the OverviewMap in the AJAX partial postback. This is easy to do: use the .Refresh command, and then copy the control's CallbackResults to the Map (the first line below is in the DropDownList2_SelectedIndexChanged method above):&lt;/p&gt;
&lt;p&gt;Map1.Extent = new_extent&lt;/p&gt;
&lt;p&gt;OverviewMap1.Refresh()&lt;/p&gt;
&lt;p&gt;Map1.CallbackResults.CopyFrom(OverviewMap1.CallbackResults)&lt;/p&gt;
&lt;p&gt;The same approach would apply to a Toc (table of contents) control.&lt;/p&gt;
</description></item><item><title>re: Using ASP.NET AJAX with the Web ADF</title><link>http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2007/04/02/Using-ASP.NET-AJAX-with-the-Web-ADF.aspx#172</link><pubDate>Wed, 04 Apr 2007 21:05:03 GMT</pubDate><guid isPermaLink="false">b60b3f0a-e2bd-4be5-8a18-822c697649ab:172</guid><dc:creator>Chuck Tilly</dc:creator><description>This is EXCELLENT material.  Thanks Bryan for writing this up.  We need more stuff like this, please.  

Now what I would really like to see is how to use the Map control as a trigger to update something in an Update Panel.  Example: a user selects features on a map and a grid in an update panel gets updated with the new corresponding data.

Thanks again Bryan.</description></item><item><title>re: Using ASP.NET AJAX with the Web ADF</title><link>http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2007/04/02/Using-ASP.NET-AJAX-with-the-Web-ADF.aspx#173</link><pubDate>Thu, 05 Apr 2007 15:41:44 GMT</pubDate><guid isPermaLink="false">b60b3f0a-e2bd-4be5-8a18-822c697649ab:173</guid><dc:creator>jxn</dc:creator><description>Im with Chuck-  Its great to see MS Ajax components updating the map, but to really use MS Ajax we need to know how to make the map control and other ADF controls update MS Ajax controls also.  This is a great start though!

Very interesting about the Overview Map causing problems- that seems like a big issue!

Thank you Bryan!</description></item><item><title>re: Using ASP.NET AJAX with the Web ADF</title><link>http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2007/04/02/Using-ASP.NET-AJAX-with-the-Web-ADF.aspx#174</link><pubDate>Sun, 08 Apr 2007 05:23:57 GMT</pubDate><guid isPermaLink="false">b60b3f0a-e2bd-4be5-8a18-822c697649ab:174</guid><dc:creator>AbdulMannan</dc:creator><description>This is really cool!!....Opens Up many gates of such developments!!</description></item><item><title>re: Using ASP.NET AJAX with the Web ADF</title><link>http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2007/04/02/Using-ASP.NET-AJAX-with-the-Web-ADF.aspx#175</link><pubDate>Thu, 12 Apr 2007 01:48:04 GMT</pubDate><guid isPermaLink="false">b60b3f0a-e2bd-4be5-8a18-822c697649ab:175</guid><dc:creator>MichalGasparovic</dc:creator><description>thank you for this tip. very interesting.</description></item><item><title>re: Using ASP.NET AJAX with the Web ADF</title><link>http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2007/04/02/Using-ASP.NET-AJAX-with-the-Web-ADF.aspx#176</link><pubDate>Thu, 12 Apr 2007 05:58:57 GMT</pubDate><guid isPermaLink="false">b60b3f0a-e2bd-4be5-8a18-822c697649ab:176</guid><dc:creator>Scott</dc:creator><description>This is a great sample application and is really appreciated.  Please showcase more material that demonstrations the use of the Web.ADF with AJAX or how about working with the ADF floating panel.  Thank you Bryan.</description></item><item><title>在esri-ajax环境中涮新asp.net显示控件的通用方法</title><link>http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2007/04/02/Using-ASP.NET-AJAX-with-the-Web-ADF.aspx#413</link><pubDate>Tue, 21 Aug 2007 00:27:44 GMT</pubDate><guid isPermaLink="false">b60b3f0a-e2bd-4be5-8a18-822c697649ab:413</guid><dc:creator>kylinindotnet</dc:creator><description>&lt;p&gt;原来一直在esri的server论坛潜水，刚到esri-chinaserver论坛来学习，发现有不少人被esri-ajax困惑。我以前也被这个问题搞得晕头转向，现在基本明白原理了。&lt;/p&gt;
&lt;p&gt;（1）arc...&lt;/p&gt;
</description></item><item><title>在esri-ajax环境中涮新asp.net显示控件的通用方法</title><link>http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2007/04/02/Using-ASP.NET-AJAX-with-the-Web-ADF.aspx#414</link><pubDate>Tue, 21 Aug 2007 00:28:53 GMT</pubDate><guid isPermaLink="false">b60b3f0a-e2bd-4be5-8a18-822c697649ab:414</guid><dc:creator>kylinindotnet</dc:creator><description>&lt;p&gt;原来一直在esri的server论坛潜水，刚到esri-chinaserver论坛来学习，发现有不少人被esri-ajax困惑。我以前也被这个问题搞得晕头转向，现在基本明白原理了。&lt;/p&gt;
&lt;p&gt;（1）arc...&lt;/p&gt;
</description></item><item><title>re: Using ASP.NET AJAX with the Web ADF</title><link>http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2007/04/02/Using-ASP.NET-AJAX-with-the-Web-ADF.aspx#506</link><pubDate>Fri, 28 Sep 2007 17:23:00 GMT</pubDate><guid isPermaLink="false">b60b3f0a-e2bd-4be5-8a18-822c697649ab:506</guid><dc:creator>Don Kang</dc:creator><description>TOC don't get refreshed.
Overview works but not TOC.
Anyone with work arounds??</description></item><item><title>re: Refreshing the Toc</title><link>http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2007/04/02/Using-ASP.NET-AJAX-with-the-Web-ADF.aspx#529</link><pubDate>Thu, 11 Oct 2007 18:07:58 GMT</pubDate><guid isPermaLink="false">b60b3f0a-e2bd-4be5-8a18-822c697649ab:529</guid><dc:creator>Bryan Baker</dc:creator><description>Don - the Toc control wasn't really designed to be refreshed outside the ADF's inherent callback framework. This is a good illustration of the issues with more involved use of AJAX at 9.2. Sometimes it takes more work to get things done, though usually it can be done.
I worked out a way to get the contents of the Toc refreshed. It's a bit messy, but seems to work. This isn't thoroughly tested, but should give some ideas. Add the function below into your page class, and call it within the section where you set the results into the ScriptManager, like this:
&lt;pre&gt;If ScriptManager1.IsInAsyncPostBack Then
    Dim tocCbr As _
        ESRI.ArcGIS.ADF.Web.UI.WebControls.CallbackResult = _
       refreshToc(Toc1)
Map1.CallbackResults.Add(tocContentResult)
...
&lt;/pre&gt;
Here's the refresh function for the Toc, first in VB, then in C#:
&lt;pre&gt;' [VB:] Refresh the Toc, return CallbackResult&lt;br&gt;    Private Function refreshToc(ByVal toc As ESRI.ArcGIS.ADF.Web.UI.WebControls.Toc) _&lt;br&gt;        As ESRI.ArcGIS.ADF.Web.UI.WebControls.CallbackResult&lt;br&gt;        ' Toc1.Refresh reloads the toc nodes, but doesn't actually &lt;br&gt;        '  generate a callback result content, which we'll do manually.&lt;br&gt;        toc.Refresh()&lt;br&gt;        ' Set up the output writer for the Toc&lt;br&gt;        Dim sw As System.IO.StringWriter = New System.IO.StringWriter()&lt;br&gt;        Dim writer As System.Web.UI.HtmlTextWriter = New HtmlTextWriter(sw)&lt;br&gt;        ' We can't call Toc.Render because it adds extra content &lt;br&gt;        ' we don't need and which causes errors. Instead, we &lt;br&gt;        ' manually render each node in the Toc.&lt;br&gt;        Dim node As ESRI.ArcGIS.ADF.Web.UI.WebControls.TreeViewPlusNode&lt;br&gt;        For Each node In toc.Nodes&lt;br&gt;            node.Render(writer)&lt;br&gt;        Next&lt;br&gt;        ' Grab the HTML-rendered content of the Toc nodes&lt;br&gt;        Dim tocNodesHtml As String = sw.ToString()&lt;br&gt;        sw.Close()&lt;br&gt;        ' Surround the nodes HTML with the DIV as in the current Toc&lt;br&gt;        Dim tocInnerContent As String = String.Concat("&amp;lt;div&amp;gt;", tocNodesHtml, "&amp;lt;/div&amp;gt;")&lt;br&gt;        ' Set this HTML content to replace the inner content of the Toc&lt;br&gt;        ' (this won't replace the &amp;lt;Toc&amp;gt; div, but the insides of it&lt;br&gt;        Dim tocContentResult As _&lt;br&gt;            New ESRI.ArcGIS.ADF.Web.UI.WebControls.CallbackResult( _&lt;br&gt;            toc, "innercontent", tocInnerContent)&lt;br&gt;        Return tocContentResult&lt;br&gt;    End Function&lt;/pre&gt;
&lt;pre&gt;// [C#:] Refresh the Toc, return CallbackResult&lt;br&gt;    private ESRI.ArcGIS.ADF.Web.UI.WebControls.CallbackResult refreshToc(&lt;br&gt;        ESRI.ArcGIS.ADF.Web.UI.WebControls.Toc toc) &lt;br&gt;    {&lt;br&gt;        // Toc1.Refresh reloads the toc nodes, but doesn't actually &lt;br&gt;        //  generate a callback result content, which we'll do manually.&lt;br&gt;        toc.Refresh();&lt;br&gt;        // Set up the output writer for the Toc&lt;br&gt;        System.IO.StringWriter sw = new System.IO.StringWriter();&lt;br&gt;        System.Web.UI.HtmlTextWriter writer = new HtmlTextWriter(sw);&lt;br&gt;        // We can't call Toc.Render because it adds extra content &lt;br&gt;        // we don't need and which causes errors. Instead, we &lt;br&gt;        // manually render each node in the Toc.&lt;br&gt;        foreach (ESRI.ArcGIS.ADF.Web.UI.WebControls.TreeViewPlusNode node in toc.Nodes)&lt;br&gt;        {&lt;br&gt;            node.Render(writer);&lt;br&gt;        }&lt;br&gt;        // Grab the HTML-rendered content of the Toc nodes&lt;br&gt;        string tocNodesHtml = sw.ToString();&lt;br&gt;        sw.Close();&lt;br&gt;        // Surround the nodes HTML with the DIV as in the current Toc&lt;br&gt;        string tocInnerContent = String.Concat("&amp;lt;div&amp;gt;", tocNodesHtml, "&amp;lt;/div&amp;gt;");&lt;br&gt;        // Set this HTML content to replace the inner content of the Toc&lt;br&gt;        // (this won't replace the &amp;lt;Toc&amp;gt; div, but the insides of it&lt;br&gt;        ESRI.ArcGIS.ADF.Web.UI.WebControls.CallbackResult tocContentResult =&lt;br&gt;            new ESRI.ArcGIS.ADF.Web.UI.WebControls.CallbackResult(&lt;br&gt;            toc, "innercontent", tocInnerContent);&lt;br&gt;        return tocContentResult;&lt;br&gt;    }&lt;br&gt;&lt;/pre&gt;</description></item><item><title>re: Using ASP.NET AJAX with the Web ADF</title><link>http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2007/04/02/Using-ASP.NET-AJAX-with-the-Web-ADF.aspx#588</link><pubDate>Wed, 07 Nov 2007 17:47:02 GMT</pubDate><guid isPermaLink="false">b60b3f0a-e2bd-4be5-8a18-822c697649ab:588</guid><dc:creator>TM</dc:creator><description>Excellent material.  The examples have enabled me to greatly improve the user experience in my web app.  Does anyone have experience using these techniques with ESRI Floating Panels?  I have an ESRI Floating Panel that I place query results in and would like this to occur asynchronously.  I have attempted to use RenderControl (FloatingPanel1.RenderControl(writer)) on the FP to set up my CallbackResult similar to the TOC example.  However, I continue to receive an error stating: "Control 'FloatingPanel1_hfHeight' of type 'HiddenField' must be placed inside a form tag with runat=server."  Any suggestions?</description></item><item><title>re: Using ASP.NET AJAX with the Web ADF</title><link>http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2007/04/02/Using-ASP.NET-AJAX-with-the-Web-ADF.aspx#591</link><pubDate>Thu, 08 Nov 2007 17:08:05 GMT</pubDate><guid isPermaLink="false">b60b3f0a-e2bd-4be5-8a18-822c697649ab:591</guid><dc:creator>AJ</dc:creator><description>I am also getting the same error about the control needing to be placed inside a for tag with runat=server although it clearly is. Any ideas?</description></item><item><title>re: Using ASP.NET AJAX with the Web ADF</title><link>http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2007/04/02/Using-ASP.NET-AJAX-with-the-Web-ADF.aspx#595</link><pubDate>Fri, 09 Nov 2007 21:55:43 GMT</pubDate><guid isPermaLink="false">b60b3f0a-e2bd-4be5-8a18-822c697649ab:595</guid><dc:creator>TM</dc:creator><description>I actually found a workaround that got rid of the error by performing these steps. 

1. Added the following subroutine to my Default.aspx.vb page: 

Public Overloads Overrides Sub VerifyRenderingInServerForm(ByVal control As Control) 
' Confirms that an HtmlForm control is rendered for the 
' specified ASP.NET server control at run time. 
' No code required here. 
End Sub 

2. Added the following line to the "&lt;@ Page" line of my Default.aspx page: 

EnableEventValidation="false" 


Sources: 
-http://www.pcreview.co.uk/forums/thread-1259153.php 
-http://geekswithblogs.net/azamsharp/archive/2005/12/21/63845.aspx 

These code additions get me around the error and work for my page. I am not sure how they would affect a more complex page. Thanks.</description></item><item><title>re: Using ASP.NET AJAX with the Web ADF</title><link>http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2007/04/02/Using-ASP.NET-AJAX-with-the-Web-ADF.aspx#774</link><pubDate>Tue, 11 Dec 2007 15:26:10 GMT</pubDate><guid isPermaLink="false">b60b3f0a-e2bd-4be5-8a18-822c697649ab:774</guid><dc:creator>tomidny</dc:creator><description>&lt;br&gt;Today I found a way to use the ASP.AJAX's UpdateTable with some ToolAction. The goal was to display the selected points in a GridView.
&lt;br&gt;I tried to do this with javascript codes and _doPostBack methods, but it didn't work well. Until I find out that the ScriptManager object is the key.
&lt;br&gt;So briefly here are may solution:
&lt;br&gt;
&lt;br&gt;In the ServerAction method after query is done put the results into the Session:
&lt;pre&gt;&lt;code&gt;
HttpContext.Current.Session[&amp;quot;MapResultTable&amp;quot;] = table;  
&lt;/code&gt;&lt;/pre&gt;
&lt;br&gt;Call some javascript function:
&lt;pre&gt;&lt;code&gt;string javascriptString = &amp;quot;updateFromMap();&amp;quot;;
CallbackResult cr = new CallbackResult(null, null, &amp;quot;javascript&amp;quot;, javascriptString);
MapInstance.CallbackResults.Add(cr);
&lt;/code&gt;&lt;/pre&gt;
&lt;br&gt;Somewhere on the page we need some javascript code:
&lt;pre&gt;
&lt;code&gt;&amp;lt;script type=&amp;quot;text/javascript&amp;quot; language=&amp;quot;javascript&amp;quot;&amp;gt;
        function updateFromMap() {
            __doPostBack('&amp;lt;%= FromMapBtn.ClientID %&amp;gt;', '');
        }
&amp;lt;/script&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;br&gt;In an UpdatePanel let's hide a button:
&lt;pre&gt;
&lt;code&gt;&amp;lt;asp:UpdatePanel ID=&amp;quot;UpdateFromMap&amp;quot; runat=&amp;quot;server&amp;quot; UpdateMode=&amp;quot;Conditional&amp;quot;&amp;gt;
	&amp;lt;ContentTemplate&amp;gt;
		&amp;lt;asp:Button ID=&amp;quot;FromMapBtn&amp;quot; runat=&amp;quot;server&amp;quot; Text=&amp;quot;From Map&amp;quot; Style=&amp;quot;display:none&amp;quot;/&amp;gt;
        &amp;lt;/ContentTemplate&amp;gt;
&amp;lt;/asp:UpdatePanel&amp;gt;
&lt;/code&gt;&lt;/pre&gt;    
&lt;br&gt;In the Page_Load method do something like this:
&lt;pre&gt;
&lt;code&gt;ScriptManager sM = ScriptManager.GetCurrent(this);
if (sM.IsInAsyncPostBack) {
        if (sM.AsyncPostBackSourceElementID == TerkeprolBtn.ClientID) {
                //Bind the data to a GridView
                DataTable src = Session[&amp;quot;MapResultTable&amp;quot;] as DataTable;
                _resultGV.DataSource = dt;
                _resultGV.DataBind();
                //refresh the GridView's UpdatePanel
                _updateResultGV.Update();
                //clear the data from the Session
                Session[&amp;quot;MapResultTable&amp;quot;] = null;                
        }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;br&gt;And it might work for you as well ;)

</description></item><item><title>re: Using ASP.NET AJAX with the Web ADF</title><link>http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2007/04/02/Using-ASP.NET-AJAX-with-the-Web-ADF.aspx#821</link><pubDate>Thu, 03 Jan 2008 19:34:37 GMT</pubDate><guid isPermaLink="false">b60b3f0a-e2bd-4be5-8a18-822c697649ab:821</guid><dc:creator>Joe Blow</dc:creator><description>A small comment from an outside observer just glancing over these posts : wasn't asp.net and ajax supposed to simplify life? I'm not sure any other aspect of web development involves so much hoop jumping as working with esri controls. </description></item><item><title>re: Using ASP.NET AJAX with the Web ADF</title><link>http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2007/04/02/Using-ASP.NET-AJAX-with-the-Web-ADF.aspx#832</link><pubDate>Tue, 08 Jan 2008 13:22:15 GMT</pubDate><guid isPermaLink="false">b60b3f0a-e2bd-4be5-8a18-822c697649ab:832</guid><dc:creator>Pragnesh</dc:creator><description>hi,
i am using scriptmanager &amp; update panle to show adrotator on my map.
But it casus problem in map result when i use pan tool. It showing wrong tile result. when i remove scriptmanager &amp; update panel it works fine.
Any idea how can i display correct result.

Thanks</description></item><item><title>re: Using ASP.NET AJAX with the Web ADF</title><link>http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2007/04/02/Using-ASP.NET-AJAX-with-the-Web-ADF.aspx#1617</link><pubDate>Tue, 08 Apr 2008 19:22:10 GMT</pubDate><guid isPermaLink="false">b60b3f0a-e2bd-4be5-8a18-822c697649ab:1617</guid><dc:creator>Renee</dc:creator><description>I'd really like to be able to zoom to a feature selected from a drop-down, but I'd like the list of features to be populated dynamically. I was hoping there would be a way to pull the spatial extent for the feature without hard-coding coordinates. I have a list of buildings that is quite long and I don't want to have rewrite code every time my layer is edited.

Is this possible in 9.2.4?</description></item><item><title>re: Using ASP.NET AJAX with the Web ADF</title><link>http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2007/04/02/Using-ASP.NET-AJAX-with-the-Web-ADF.aspx#2150</link><pubDate>Tue, 06 May 2008 22:04:38 GMT</pubDate><guid isPermaLink="false">b60b3f0a-e2bd-4be5-8a18-822c697649ab:2150</guid><dc:creator>Jared A</dc:creator><description>
Has any found a solution to the Pragnesh discovered? I'm having the issue with pan something is not in sync with Feature Layer and Graphic Layer when using the pan tool?
</description></item><item><title>re: Using ASP.NET AJAX with the Web ADF</title><link>http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2007/04/02/Using-ASP.NET-AJAX-with-the-Web-ADF.aspx#2348</link><pubDate>Sat, 05 Jul 2008 10:51:00 GMT</pubDate><guid isPermaLink="false">b60b3f0a-e2bd-4be5-8a18-822c697649ab:2348</guid><dc:creator>laksh</dc:creator><description>Dear All,
I have one specific problem in 9.3 using .NET with respect to refreshing TOC. I am moving layer up on clikcing an item 'Move Layer Up' in context menu of TOC. Code works fine. But when I do second time Treeview Plus node become null

protected void ContextMenu1_ItemClicked(object sender, ContextMenuItemEventArgs args)
    {
ESRI.ArcGIS.ADF.Web.UI.WebControls.TreeViewPlusNode pNode = Toc1.Nodes.FindByNodeID(args.Context);

//Here pNode value is null for second time clicking on layer in TOC. On Debugging TOC contains nodes but ID is not matched so it returns null. 
}

How to Update TOC. Function given above doesnot helps.

case "Move Layer UP":
                       MoveLayerUP(pNode.Text);
                       Map1.Refresh();
                       ContextMenu1.CallbackResults.CopyFrom(Map1.CallbackResults);
                       Toc1.Refresh();
                       SetUpContextMenu();
                       ContextMenu1.CallbackResults.Add(RefreshControlHTML(Toc1));

//Referesh Control FUnction COde

private ESRI.ArcGIS.ADF.Web.UI.WebControls.CallbackResult RefreshControlHTML(Control control)
    {
        try
        {
            System.IO.StringWriter strWriter = new System.IO.StringWriter();
            HtmlTextWriter htmlWriter = new HtmlTextWriter(strWriter);
            control.RenderControl(htmlWriter);
            string htmlContent = strWriter.ToString();
            strWriter.Close();
            return new CallbackResult(control, "content", htmlContent);
        }
        catch (Exception ex)
        {
             
             callErrorPage(ex.Message, null);
             return null; 
        }
      

    }

</description></item><item><title>re: Using ASP.NET AJAX with the Web ADF</title><link>http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2007/04/02/Using-ASP.NET-AJAX-with-the-Web-ADF.aspx#3516</link><pubDate>Sat, 17 Jan 2009 00:38:25 GMT</pubDate><guid isPermaLink="false">b60b3f0a-e2bd-4be5-8a18-822c697649ab:3516</guid><dc:creator>tbacon</dc:creator><description>&lt;p&gt;I'd like to see an example utilizing an update panel within an EditorPanel. What I am trying to do is the rough equivelant of a custom Feature Inspector (like we can do via featureclass extension and ArcMap). I can get a user control (ascx) to load and display. I can populate the user control based on feature selection. Where I fail is in updating the feature based on input to the user control. It is as if the EditorPanel is intercepting the callbacks. For example, my textboxes do not reflect what the user entered. &lt;/p&gt;
</description></item><item><title>re: Using ASP.NET AJAX with the Web ADF</title><link>http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2007/04/02/Using-ASP.NET-AJAX-with-the-Web-ADF.aspx#4419</link><pubDate>Wed, 01 Apr 2009 14:06:01 GMT</pubDate><guid isPermaLink="false">b60b3f0a-e2bd-4be5-8a18-822c697649ab:4419</guid><dc:creator>Matthew Blackler</dc:creator><description>Excellent excellent excellent tutorial, very clear and concise.

I have been struggling with this for a day with various methods recommended on the boards, and by following this tutorial, it now works a dream.

Thankyou for taking the time to post this!
</description></item><item><title>re: Using ASP.NET AJAX with the Web ADF</title><link>http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2007/04/02/Using-ASP.NET-AJAX-with-the-Web-ADF.aspx#6584</link><pubDate>Thu, 25 Jun 2009 16:09:31 GMT</pubDate><guid isPermaLink="false">b60b3f0a-e2bd-4be5-8a18-822c697649ab:6584</guid><dc:creator>Eric Kauffman</dc:creator><description>I just wanted to leave a note in case someone else (including me down the road), runs into this.  The javascript for the PageLoadingHandler above broke if the map was on a page that used a "Master Page".  Doing this seemed to change the ID of the map to something other than "Map1".  So, I fixed this by replacing: 'Map1' with '&lt;%= Map1.ClientID %&gt;'.</description></item></channel></rss>