<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://serverx.esri.com/ESRIBlogs/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><title type="html">ArcGIS Server Development Blog</title><subtitle type="html" /><id>http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/atom.aspx</id><link rel="alternate" type="text/html" href="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/default.aspx" /><link rel="self" type="application/atom+xml" href="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/atom.aspx" /><generator uri="http://communityserver.org" version="2.1.60809.935">Community Server</generator><updated>2006-12-18T15:51:00Z</updated><entry><title>The ArcGIS Server Development Blog has moved</title><link rel="alternate" type="text/html" href="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/2007/05/09/The-ArcGIS-Server-Development-Blog-has-moved.aspx" /><id>http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/2007/05/09/The-ArcGIS-Server-Development-Blog-has-moved.aspx</id><published>2007-05-09T16:00:00Z</published><updated>2007-05-09T16:00:00Z</updated><content type="html">&lt;p&gt;The ArcGIS Server Development Blog has moved to the ESRI blogs home at &lt;a href="http://blogs.esri.com/arcgisserver"&gt;http://blogs.esri.com/arcgisserver&lt;/a&gt;. Please update your bookmarks and RSS feeds to reference the new location.&lt;/p&gt;&lt;p&gt;As part of the move, any current accounts you&amp;rsquo;ve created on this blog will be unavailable on the new site. Instead, you can use your &lt;a href="https://webaccounts.esri.com/CAS/index.cfm"&gt;ESRI Global Account&lt;/a&gt;&amp;nbsp;if you wish to sign in to the new site. Creating an ESRI Global Account is free and available to everyone.&lt;/p&gt;&lt;p&gt;The blog will still be written by the ArcGIS Server development team, and you&amp;rsquo;ll be able to see all previous posts and comments. We apologize for any inconvenience caused by this move, and look forward to your continued support and readership.&lt;/p&gt;&lt;img src="http://serverx.esri.com/ESRIBlogs/aggbug.aspx?PostID=209" width="1" height="1"&gt;</content><author><name>Sterling</name><uri>http://serverx.esri.com/ESRIBlogs/members/Sterling.aspx</uri></author></entry><entry><title>Follow-up to Extending the QueryAttributes Task: Zooming to selected features</title><link rel="alternate" type="text/html" href="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/2007/05/03/Follow_2D00_up-to-Extending-the-QueryAttributes-Task_3A00_-Zooming-to-selected-features.aspx" /><id>http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/2007/05/03/Follow_2D00_up-to-Extending-the-QueryAttributes-Task_3A00_-Zooming-to-selected-features.aspx</id><published>2007-05-03T19:15:00Z</published><updated>2007-05-03T19:15:00Z</updated><content type="html">&lt;p&gt;From Bryan Baker, a&amp;nbsp;product engineer&amp;nbsp;working on the .NET SDK:&amp;nbsp;&lt;/p&gt;&lt;p&gt;I wrote an &lt;a href="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/2007/02/12/Extending-the-QueryAttributesTask-to-highlight-selected-features.aspx"&gt;earlier post&lt;/a&gt; that showed how to extend the QueryAttributes task so that all features are immediately highlighted. Several users have asked about also zooming to the selected features. I&amp;#39;ll show that here, though keep in mind that the user can also zoom to the selected features by right-clicking on the node for the layer (Cities in the graphic at the top of the earlier post) and choosing to zoom to selected features.&lt;/p&gt;&lt;p&gt;It turns out that it&amp;#39;s a little more difficult to zoom to the features than I originally thought, because the FullExtent property of the graphics layer is null for queries like this. Instead, we have to construct our own envelope around all the features by looping through them. This isn&amp;#39;t that difficult, though of course it does require more processing.&lt;/p&gt;&lt;p&gt;I&amp;rsquo;ve included code below that does the zooming. This code should be added to near the bottom of the existing code in the earlier post. If for some reason you didn&amp;rsquo;t want to highlight all the features, you could omit or comment out the line in the loop that sets the selectedCol to true.&lt;/p&gt;&lt;p&gt;The code below first creates an envelope to use, then in the existing loop that selects each feature, it widens the envelope to surround each feature. Once it has the envelope, it gets a reference to the Map control so it can set the Map&amp;rsquo;s extent. This takes some work, since the task itself has no reference to the Map. We have to get the ID of the Map and then search the page&amp;rsquo;s control tree. Since the Map control could be nested within another control, such as in a FloatingPanel, we search for it recursively using a custom function (found at the bottom of this listing).&lt;/p&gt;&lt;p&gt;One more thing before we zoom the map: the task could be querying a point layer, and if only one point is found, the &amp;ldquo;envelope&amp;rdquo; around all features is a point. We can&amp;rsquo;t zoom to a point, so instead we set the envelope to a percentage of the full extent of the Map (five percent&amp;mdash;this value is hard-coded here, and you can change it depending on tightly you want to zoom in this one-point case).&lt;/p&gt;&lt;p&gt;Finally, we&amp;rsquo;ve got an envelope that will work, and we set the Map to this extent, refresh the Map, and copy its CallbackResults to the task&amp;rsquo;s CallbackResults. This last step is necessary because a callback only works with one control (the task in this case), and we need to tell another control (the Map) to update its contents.&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:green;"&gt;&amp;#39; Set up the items to hold the extent of all features&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;Dim&lt;/span&gt; geom &lt;span style="color:blue;"&gt;As&lt;/span&gt; ESRI.ArcGIS.ADF.Web.Geometry.Geometry&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;Dim&lt;/span&gt; layerEnv &lt;span style="color:blue;"&gt;As&lt;/span&gt; &lt;span style="color:blue;"&gt;New&lt;/span&gt; _&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;ESRI.ArcGIS.ADF.Web.Geometry.Envelope( _&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;Double&lt;/span&gt;.MaxValue, &lt;span style="color:blue;"&gt;Double&lt;/span&gt;.MaxValue, _&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;Double&lt;/span&gt;.MinValue, &lt;span style="color:blue;"&gt;Double&lt;/span&gt;.MinValue)&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:green;"&gt;&amp;#39; Set each feature to selected (this loop is&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:green;"&gt;&amp;#39; at the end the code in my previous blog post)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;For&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt; &lt;span style="color:blue;"&gt;Each&lt;/span&gt; row &lt;span style="color:blue;"&gt;As&lt;/span&gt; DataRow &lt;span style="color:blue;"&gt;In&lt;/span&gt; graphicsLayer.Rows&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;row(selectedCol) = &lt;span style="color:blue;"&gt;True&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:green;"&gt;&amp;#39; Enlarge the overall envelope to &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:green;"&gt;&amp;#39;&lt;span&gt;&amp;nbsp; &lt;/span&gt;include the current feature&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;geom = graphicsLayer.GeometryFromRow(row)&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;layerEnv.Union(geom)&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;Next&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:green;"&gt;&amp;#39; If any records found, zoom to them&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;If&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt; graphicsLayer.Rows.Count &amp;gt; 0 &lt;span style="color:blue;"&gt;Then&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:green;"&gt;&amp;#39; Get a reference to the Map - have to search the Page since&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:green;"&gt;&amp;#39; &lt;span&gt;&amp;nbsp;&lt;/span&gt;task itself has no direct reference to the Map&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:green;"&gt;&amp;#39; (the task&amp;#39;s TaskResults does have the ID of the map)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;Dim&lt;/span&gt; mapCtrl &lt;span style="color:blue;"&gt;As&lt;/span&gt; Map = &lt;span style="color:blue;"&gt;Nothing&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;Dim&lt;/span&gt; taskResultsId &lt;span style="color:blue;"&gt;As&lt;/span&gt; &lt;span style="color:blue;"&gt;String&lt;/span&gt; = &lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;Me&lt;/span&gt;.TaskResultsContainers(0).Name&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;Dim&lt;/span&gt; taskResults &lt;span style="color:blue;"&gt;As&lt;/span&gt; TaskResults = _&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color:blue;"&gt;CType&lt;/span&gt;(FindControlRecursive( _&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;Me&lt;/span&gt;.Page, taskResultsId), TaskResults)&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;If&lt;/span&gt; &lt;span style="color:blue;"&gt;Not&lt;/span&gt; TaskResults &lt;span style="color:blue;"&gt;Is&lt;/span&gt; &lt;span style="color:blue;"&gt;Nothing&lt;/span&gt; &lt;span style="color:blue;"&gt;Then&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;mapCtrl = &lt;span style="color:blue;"&gt;CType&lt;/span&gt;(FindControlRecursive( _&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;Me&lt;/span&gt;.Page, taskResults.Map), Map)&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;End&lt;/span&gt; &lt;span style="color:blue;"&gt;If&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;If&lt;/span&gt; &lt;span style="color:blue;"&gt;Not&lt;/span&gt; mapCtrl &lt;span style="color:blue;"&gt;Is&lt;/span&gt; &lt;span style="color:blue;"&gt;Nothing&lt;/span&gt; &lt;span style="color:blue;"&gt;Then&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:green;"&gt;&amp;#39; If only one point found, envelope will be a point&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:green;"&gt;&amp;#39;&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;-- set to a percentage of the full extent&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;If&lt;/span&gt; layerEnv.XMin = layerEnv.XMax &lt;span style="color:blue;"&gt;AndAlso&lt;/span&gt; _&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;layerEnv.YMin = layerEnv.YMax &lt;span style="color:blue;"&gt;AndAlso&lt;/span&gt; _&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;Not&lt;/span&gt; IsNothing(mapCtrl) &lt;span style="color:blue;"&gt;Then&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:green;"&gt;&amp;#39; Percentage of the full extent to use when zooming to point&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;Dim&lt;/span&gt; zoomToPointPercentage &lt;span style="color:blue;"&gt;As&lt;/span&gt; &lt;span style="color:blue;"&gt;Integer&lt;/span&gt; = 5&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;Dim&lt;/span&gt; NewWidth &lt;span style="color:blue;"&gt;As&lt;/span&gt; &lt;span style="color:blue;"&gt;Double&lt;/span&gt; = mapCtrl.GetFullExtent().Width _&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;* (zoomToPointPercentage / 100)&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;Dim&lt;/span&gt; NewHeight &lt;span style="color:blue;"&gt;As&lt;/span&gt; &lt;span style="color:blue;"&gt;Double&lt;/span&gt; = mapCtrl.GetFullExtent().Height _&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;* (zoomToPointPercentage / 100)&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;layerEnv.XMin -= NewWidth / 2&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;layerEnv.XMax += NewWidth / 2&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;layerEnv.YMin -= NewHeight / 2&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;layerEnv.YMax += NewHeight / 2&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;End&lt;/span&gt; &lt;span style="color:blue;"&gt;If&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:green;"&gt;&amp;#39; Now we can zoom the map to the extent of the features&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;mapCtrl.Extent = layerEnv&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;mapCtrl.Refresh()&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:green;"&gt;&amp;#39; We have to tell the client to refresh, using CallbackResults&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;Me&lt;/span&gt;.CallbackResults.CopyFrom(mapCtrl.CallbackResults)&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;End&lt;/span&gt; &lt;span style="color:blue;"&gt;If&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;End&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt; &lt;span style="color:blue;"&gt;If&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Below is the function called in the above code. This searches the page and its child controls for the control with the given ID. Put this after the end of the Execute method (End Sub), but inside the Class (before the End Class statement).&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:green;"&gt;&amp;#39; Finds the control in the Page&amp;#39;s control tree&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;Public&lt;/span&gt; &lt;span style="color:blue;"&gt;Function&lt;/span&gt; FindControlRecursive(&lt;span style="color:blue;"&gt;ByVal&lt;/span&gt; root &lt;span style="color:blue;"&gt;As&lt;/span&gt; _&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Control, &lt;span style="color:blue;"&gt;ByVal&lt;/span&gt; id &lt;span style="color:blue;"&gt;As&lt;/span&gt; &lt;span style="color:blue;"&gt;String&lt;/span&gt;) &lt;span style="color:blue;"&gt;As&lt;/span&gt; Control&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;If&lt;/span&gt; root.ID = id &lt;span style="color:blue;"&gt;Then&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;Return&lt;/span&gt; root&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;End&lt;/span&gt; &lt;span style="color:blue;"&gt;If&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;Dim&lt;/span&gt; c &lt;span style="color:blue;"&gt;As&lt;/span&gt; Control&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color:blue;"&gt;For&lt;/span&gt; &lt;span style="color:blue;"&gt;Each&lt;/span&gt; c &lt;span style="color:blue;"&gt;In&lt;/span&gt; root.Controls&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;Dim&lt;/span&gt; t &lt;span style="color:blue;"&gt;As&lt;/span&gt; Control = FindControlRecursive(c, id)&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;If&lt;/span&gt; &lt;span style="color:blue;"&gt;Not&lt;/span&gt; t &lt;span style="color:blue;"&gt;Is&lt;/span&gt; &lt;span style="color:blue;"&gt;Nothing&lt;/span&gt; &lt;span style="color:blue;"&gt;Then&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;Return&lt;/span&gt; t&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;End&lt;/span&gt; &lt;span style="color:blue;"&gt;If&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;Next&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;Return&lt;/span&gt; &lt;span style="color:blue;"&gt;Nothing&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;End&lt;/span&gt; &lt;span style="color:blue;"&gt;Function&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;If you add the code above to the custom task as outlined in the earlier blog post, it should automatically zoom to the extent of all features found by the task.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://serverx.esri.com/ESRIBlogs/aggbug.aspx?PostID=189" width="1" height="1"&gt;</content><author><name>Sterling</name><uri>http://serverx.esri.com/ESRIBlogs/members/Sterling.aspx</uri></author><category term="ADF" scheme="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/ADF/default.aspx" /><category term=".NET" scheme="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/.NET/default.aspx" /><category term="Code Snippet" scheme="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/Code+Snippet/default.aspx" /><category term="Tasks" scheme="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/Tasks/default.aspx" /></entry><entry><title>Customizing the Web Editor task</title><link rel="alternate" type="text/html" href="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/2007/05/02/Customizing-the-Web-Editor-task.aspx" /><id>http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/2007/05/02/Customizing-the-Web-Editor-task.aspx</id><published>2007-05-02T17:30:00Z</published><updated>2007-05-02T17:30:00Z</updated><content type="html">&lt;p&gt;&amp;nbsp;James Goodrich, a developer on the .NET Web ADF team, contributed this information about some Service Pack 2 enhancements to the Editor task:&lt;/p&gt;&lt;p&gt;&amp;nbsp;When the Editor task was released at version 9.2 of the Web ADF for the .NET Framework, a common question was &amp;quot;How can I customize the Editor task?&amp;quot;. Service Pack 2 provides an answer to this question. You can now customize the Editor task with custom tools and Editor Panels and we have added more events that allow you to hook into the Editor task. &lt;/p&gt;&lt;p&gt;In addition to these new customization options for developers, the Editor task has another key change at Service Pack 2 which it allows it to be configured with a pooled map service. You can edit non-versioned data using a pooled map service.&lt;/p&gt;&lt;p&gt;See the &lt;a href="http://edndoc.esri.com/arcobjects/9.2/NET_Server_Doc/developer/ADF/control_editortask.htm" target="_blank"&gt;Editor Task control discussion&lt;/a&gt; in the Developer Help for samples and instructions.&lt;/p&gt;&lt;p&gt;&lt;img alt="Customized Editor Task with added tools" border="1" height="370" src="http://serverx.esri.com/blogimages/may-2-2007/editor_new_tools.png" style="width:294px;height:370px;" title="Customized Editor Task with added tools" width="294" /&gt;&lt;/p&gt;&lt;img src="http://serverx.esri.com/ESRIBlogs/aggbug.aspx?PostID=184" width="1" height="1"&gt;</content><author><name>Sterling</name><uri>http://serverx.esri.com/ESRIBlogs/members/Sterling.aspx</uri></author><category term="ADF" scheme="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/ADF/default.aspx" /><category term=".NET" scheme="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/.NET/default.aspx" /><category term="Tasks" scheme="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/Tasks/default.aspx" /><category term="92 SP2" scheme="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/92+SP2/default.aspx" /></entry><entry><title>How to track pending tiles and display a busy indicator in a Web mapping application</title><link rel="alternate" type="text/html" href="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/2007/05/01/How-to-track-pending-tiles-and-display-a-busy-indicator-in-a-Web-mapping-application.aspx" /><id>http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/2007/05/01/How-to-track-pending-tiles-and-display-a-busy-indicator-in-a-Web-mapping-application.aspx</id><published>2007-05-01T19:05:00Z</published><updated>2007-05-01T19:05:00Z</updated><content type="html">&lt;p&gt;Rex Hansen contributed this post about how to use some of the enhanced JavaScript in Service Pack 2 to track pending tiles and display a busy indicator (such as an animated &amp;quot;Loading&amp;quot; graphic) over the Web ADF&amp;#39;s Map control:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;As a Web ADF developer working in an asynchronous communication environment, it is often beneficial to provide an end user with some indication that a user action is being processed.   Since most Web ADF applications are centered on working with a map, the ability of an end user to effectively interact with map contents is essential.   The Web ADF has the ability to asynchronously retrieve map data from multiple sources and consolidate it in a single map control.  In general, data sources often differ in the time it takes to respond to a request.  Since the Web ADF Map control is capable of rendering map data as it is returned to the browser, it&amp;rsquo;s possible that some portion of data in the map is visible and accessible before another portion.  In this case, it will likely be important to let the end user know when the map control has finished loading map data from any and all sources.&lt;/p&gt;

&lt;p&gt;To support this capability, 9.2 service pack 2 includes an enhanced Web ADF JavaScript Map object.   The JavaScript Map object has a set of &amp;ldquo;event handlers&amp;rdquo; on the pendingTiles property.  The pendingTiles property references an array of map image tiles to be rendered.  The array is updated when the map needs new image tiles based on the current extent.   Events on the pendingTiles property are listed below:&lt;/p&gt;

&lt;table&gt;

&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Event&lt;/strong&gt;&lt;/td&gt;
                                                 
&lt;td&gt;&lt;strong&gt;Description&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;add_onRequestsPending&lt;/td&gt;
                                                 
&lt;td&gt;              Triggered when the number of items in the pendingTiles array changes from 0 to a higher value&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;add_onRequestsRemove&lt;/td&gt;
                                                 
&lt;td&gt;              Triggered when an item is removed from the pendingTiles array&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;add_onRequestsCompleted&lt;/td&gt;
                                                 
&lt;td&gt;         Triggered when the number of item in the pendingTiles array changes to 0&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;

&lt;p&gt;Use these handlers on the Map object&amp;rsquo;s pendingTiles property to register a JavaScript function with the event.  For example:&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;map.pendingTiles.add_onRequestsPending(showBusyIndicator)&lt;/span&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;where map is the Map object and showBusyIndicator is a JavaScript function to call when the number of items in the pendingTiles array changes from 0 to a higher value.&lt;/p&gt;

&lt;p&gt;The JavaScript function showBusyIndicator may appear as follows.&lt;/p&gt;


&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:blue;"&gt;function&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt; showBusyIndicator(sender) {&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;showLayer(&lt;span style="color:maroon;"&gt;&amp;quot;BusyIndicator&amp;quot;&lt;/span&gt;);&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;if&lt;/span&gt;
(sender!=&lt;span style="color:blue;"&gt;null&lt;/span&gt;) {&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;window.status = &lt;span style="color:maroon;"&gt;&amp;quot;Pending Tiles: &amp;quot;&lt;/span&gt; +
sender.pendingTiles.length; &lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;/span&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The argument to the function is a reference to the JavaScript Map object.  This argument can be used to gain access to map properties, such as the number of map image tiles left in the pendingTiles array.  In this example, the number of pending tiles is output to the browser window&amp;rsquo;s status bar.  If the argument is null, the pendingTiles array contains 0 items.  The Web ADF includes two convenient JavaScript functions to show or hide a layer (div) based on its id, named showLayer and hideLayer, respectively.  The functions are contained in the display_common.js file which is by default embedded with the Web ADF controls. In this example, the showLayer function is used to make the contents in the div tag with an id of &amp;ldquo;BusyIndicator&amp;rdquo; visible.&lt;/p&gt;&lt;p&gt;&lt;img alt="You can show the number of pending tiles and a &amp;quot;Busy indicator&amp;quot; in your Web application" border="1" height="593" hspace="5" src="http://serverx.esri.com/blogimages/MAY-1-2007/show_loading.jpg" title="You can show the number of pending tiles and a &amp;quot;Busy indicator&amp;quot; in your Web application" width="768" /&gt;&lt;br /&gt;&amp;nbsp;&lt;/p&gt;

&lt;p&gt;Included below is a simple Web page with a MapResourceManager, Map, and a div tag containing an image.   The JavaScript Map object events are handled after the form to let the content of the form load before interacting with it.&lt;br /&gt;
&amp;nbsp;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="background:yellow none repeat scroll 0% 50%;font-size:10pt;font-family:'Courier New';-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;&amp;lt;%&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:blue;"&gt;@&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt; &lt;span style="color:maroon;"&gt;Page&lt;/span&gt; &lt;span style="color:red;"&gt;Language&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;C#&amp;quot;&lt;/span&gt;
&lt;span style="color:red;"&gt;AutoEventWireup&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;true&amp;quot;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color:red;"&gt;CodeFile&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;Default.aspx.cs&amp;quot;&lt;/span&gt; &lt;span style="color:red;"&gt;Inherits&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;_Default&amp;quot;&lt;/span&gt; &lt;span style="background:yellow none repeat scroll 0% 50%;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;%&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="background:yellow none repeat scroll 0% 50%;font-size:10pt;font-family:'Courier New';-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;&amp;lt;%&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:blue;"&gt;@&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt; &lt;span style="color:maroon;"&gt;Register&lt;/span&gt; &lt;span style="color:red;"&gt;Assembly&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;ESRI.ArcGIS.ADF.Web.UI.WebControls,
Version=9.2.2.1350, Culture=neutral, PublicKeyToken=8fc3cc631e44ad86&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;span style="color:red;"&gt;Namespace&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;ESRI.ArcGIS.ADF.Web.UI.WebControls&amp;quot;&lt;/span&gt;
&lt;span style="color:red;"&gt;TagPrefix&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;esri&amp;quot;&lt;/span&gt;
&lt;span style="background:yellow none repeat scroll 0% 50%;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;%&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:blue;"&gt;&amp;lt;!&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:maroon;"&gt;DOCTYPE&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt; &lt;span style="color:red;"&gt;html&lt;/span&gt;
&lt;span style="color:red;"&gt;PUBLIC&lt;/span&gt; &lt;span style="color:blue;"&gt;&amp;quot;-//W3C//DTD
XHTML 1.0 Transitional//EN&amp;quot;&lt;/span&gt; &lt;span style="color:blue;"&gt;&amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&amp;quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:maroon;"&gt;html&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt; &lt;span style="color:red;"&gt;xmlns&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;&lt;/span&gt; &lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:maroon;"&gt;head&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt; &lt;span style="color:red;"&gt;runat&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;server&amp;quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;title&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;Untitled Page&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;title&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:maroon;"&gt;head&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:maroon;"&gt;body&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;form&lt;/span&gt;
&lt;span style="color:red;"&gt;id&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;form1&amp;quot;&lt;/span&gt;
&lt;span style="color:red;"&gt;runat&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;server&amp;quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;div&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;esri&lt;/span&gt;&lt;span style="color:blue;"&gt;:&lt;/span&gt;&lt;span style="color:maroon;"&gt;MapResourceManager&lt;/span&gt; &lt;span style="color:red;"&gt;ID&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;MapResourceManager1&amp;quot;&lt;/span&gt; &lt;span style="color:red;"&gt;runat&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;server&amp;quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;ResourceItems&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;ResourceItems&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;esri&lt;/span&gt;&lt;span style="color:blue;"&gt;:&lt;/span&gt;&lt;span style="color:maroon;"&gt;MapResourceManager&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;esri&lt;/span&gt;&lt;span style="color:blue;"&gt;:&lt;/span&gt;&lt;span style="color:maroon;"&gt;Map&lt;/span&gt; &lt;span style="color:red;"&gt;ID&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;Map1&amp;quot;&lt;/span&gt; &lt;span style="color:red;"&gt;runat&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;server&amp;quot;&lt;/span&gt; &lt;span style="color:red;"&gt;Height&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;453px&amp;quot;&lt;/span&gt; &lt;span style="color:red;"&gt;Width&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;556px&amp;quot;&lt;/span&gt; &lt;span style="color:red;"&gt;MapResourceManager&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;MapResourceManager1&amp;quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;esri&lt;/span&gt;&lt;span style="color:blue;"&gt;:&lt;/span&gt;&lt;span style="color:maroon;"&gt;Map&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;div&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;div&lt;/span&gt; &lt;span style="color:red;"&gt;id&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;BusyIndicator&amp;quot;&lt;/span&gt; &lt;span style="color:red;"&gt;style&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;z-index: 1000; left: 25px; width: 100px; position:
absolute; top: 422px;height: 100px&amp;quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;img&lt;/span&gt; &lt;span style="color:red;"&gt;src&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;images/CircleThickbox.gif&amp;quot;&lt;/span&gt; &lt;span style="color:blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;div&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt; &lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;form&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon;"&gt;script&lt;/span&gt;
&lt;span style="color:red;"&gt;language&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;javascript&amp;quot;&lt;/span&gt;
&lt;span style="color:red;"&gt;type&lt;/span&gt;&lt;span style="color:blue;"&gt;=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;function&lt;/span&gt;
showBusyIndicator(sender) {&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;showLayer(&lt;span style="color:maroon;"&gt;&amp;quot;BusyIndicator&amp;quot;&lt;/span&gt;);&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;if&lt;/span&gt;
(sender!=&lt;span style="color:blue;"&gt;null&lt;/span&gt;) {&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;window.status = &lt;span style="color:maroon;"&gt;&amp;quot;Pending Tiles: &amp;quot;&lt;/span&gt; +
sender.pendingTiles.length; &lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;span&gt;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;function&lt;/span&gt;
showPendingTiles(sender) {&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;if&lt;/span&gt;
(sender!=&lt;span style="color:blue;"&gt;null&lt;/span&gt;) {&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;window.status = &lt;span style="color:maroon;"&gt;&amp;quot;Pending Tiles: &amp;quot;&lt;/span&gt; +
sender.pendingTiles.length; &lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;span&gt;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;function&lt;/span&gt;
hideBusyIndicator(sender) {&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;hideLayer(&lt;span style="color:maroon;"&gt;&amp;quot;BusyIndicator&amp;quot;&lt;/span&gt;);&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;if&lt;/span&gt;
(sender!=&lt;span style="color:blue;"&gt;null&lt;/span&gt;) {&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;window.status = &lt;span style="color:maroon;"&gt;&amp;quot;&amp;quot;&lt;/span&gt;; &lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;span&gt;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;} &lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:green;"&gt;// add busy
indicator functions to the map&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;map = Maps[&lt;span style="color:maroon;"&gt;&amp;quot;Map1&amp;quot;&lt;/span&gt;];&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;map.pendingTiles.add_onRequestsPending(showBusyIndicator);&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;map.pendingTiles.add_onRequestsRemove(showPendingTiles);&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;map.pendingTiles.add_onRequestsCompleted(hideBusyIndicator);&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;script&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:maroon;"&gt;body&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:maroon;"&gt;html&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;img src="http://serverx.esri.com/ESRIBlogs/aggbug.aspx?PostID=181" width="1" height="1"&gt;</content><author><name>Sterling</name><uri>http://serverx.esri.com/ESRIBlogs/members/Sterling.aspx</uri></author><category term="ADF" scheme="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/ADF/default.aspx" /><category term=".NET" scheme="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/.NET/default.aspx" /><category term="Code Snippet" scheme="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/Code+Snippet/default.aspx" /><category term="AJAX" scheme="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/AJAX/default.aspx" /><category term="92 SP2" scheme="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/92+SP2/default.aspx" /></entry><entry><title>Configuring your server to display a &quot;Data not available&quot; tile for empty map cache areas</title><link rel="alternate" type="text/html" href="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/2007/04/12/Configuring-your-server-to-display-a-_2200_Data-not-available_2200_-tile-for-empty-map-cache-areas.aspx" /><id>http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/2007/04/12/Configuring-your-server-to-display-a-_2200_Data-not-available_2200_-tile-for-empty-map-cache-areas.aspx</id><published>2007-04-12T16:00:00Z</published><updated>2007-04-12T16:00:00Z</updated><content type="html">&lt;p&gt;Sterling Quinn of the Server team contributed this post on configuring your web server to display custom tiles in areas where you have not yet completed your map cache.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;p&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;At the ESRI
Developer Summit, several of you asked how we displayed a &amp;ldquo;Data not available&amp;rdquo;
tile in empty areas of the ArcGIS Online services. This kind of tile can be
useful if someone pans to the edge of the map or navigates to an area that you
have not completed caching. Configuring your server to return a &amp;ldquo;Data not available&amp;rdquo;
tile can in some cases yield a better user experience than returning nothing.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;img border="1" height="497" src="http://serverx.esri.com/blogimages/APR-12-2007/data_not_available_app.JPG" width="640" /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;To display
the tile, you need to create a custom error response on your virtual cache
directory for HTTP Error 404: &amp;ldquo;Not Found&amp;rdquo;. Instead of an error message, the Web
server returns the tile.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;br /&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;Following
are steps for this process in IIS. Before you perform these steps, you should
put the blank or &amp;ldquo;Data not available&amp;rdquo; tile in your cache directory. The tile
you use must have the same dimensions and image format as the other tiles in
the cache. &lt;/span&gt;



&lt;/p&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;&lt;/span&gt;&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;1. In IIS
Manager, right-click the Virtual Directory for the specific cache and select
Properties. &lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;img border="1" height="451" src="http://serverx.esri.com/blogimages/APR-12-2007/virtual_directory_properties.PNG" width="487" /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;2. Click
the Custom Errors tab, scroll down, and select the 404 error code.&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;3. Click
the Edit button. In the URL box, specify the tile that IIS should return
whenever a tile is missing. It is important to use a URL and not just a path to
a file.&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;4. Click
OK. Your dialog should look similar to the one below. Click OK again to return
to IIS Manager.&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;

&lt;p&gt;&lt;img border="1" height="447" src="http://serverx.esri.com/blogimages/APR-12-2007/custom_error_iis.PNG" width="472" /&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;You can download a sample, &amp;quot;Map data not yet available&amp;quot; tile (512 X 512 JPG) that you can use &lt;a href="http://serverx.esri.com/blogimages/APR-12-2007/data_not_avail.jpg" target="_blank"&gt;here&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://serverx.esri.com/ESRIBlogs/aggbug.aspx?PostID=177" width="1" height="1"&gt;</content><author><name>Jeremy</name><uri>http://serverx.esri.com/ESRIBlogs/members/Jeremy.aspx</uri></author><category term="ADF" scheme="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/ADF/default.aspx" /><category term="Map Cache" scheme="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/Map+Cache/default.aspx" /></entry><entry><title>Using ASP.NET AJAX with the Web ADF</title><link rel="alternate" type="text/html" href="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/2007/04/02/Using-ASP.NET-AJAX-with-the-Web-ADF.aspx" /><id>http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/2007/04/02/Using-ASP.NET-AJAX-with-the-Web-ADF.aspx</id><published>2007-04-02T14:21:00Z</published><updated>2007-04-02T14:21:00Z</updated><content type="html">&lt;p&gt;Bryan Baker of the .NET SDK team wrote this great article on integration ASP.NET AJAX with the Web ADF. &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Microsoft&amp;#39;s new &lt;a href="http://ajax.asp.net/" target="_blank"&gt;ASP.NET AJAX&lt;/a&gt; enables developers to refresh portions of a Web page in a relatively simple way. To enable a control to use AJAX, the developer can put the control inside an &lt;a href="http://ajax.asp.net/docs/overview/UpdatePanelOverview.aspx" target="_blank"&gt;UpdatePanel&lt;/a&gt;. Then any events on the control are automatically handled via AJAX, and updates are passed back without refreshing the entire page. For example, a page might have two drop-down lists. The first lists types of features, such as Cities and Countries. When the user picks a value in the first drop-down, the second list is populated with new values corresponding to the first list&amp;#39;s value, such as a list of cities.&lt;/p&gt;&lt;p&gt;Web ADF developers might want to use this approach to update the Map or other ADF controls. For example, when the user selects a city in the second drop-down list, the Map would zoom to the selected city. The problem is that ASP.NET AJAX was released after the 9.2 version of the Web ADF, and these new features were not available to be incorporated. Putting Web ADF controls inside an UpdatePanel will not work correctly, and is not supported. At 9.3 ESRI does plan to support Web ADF controls with ASP.NET AJAX.&lt;/p&gt;&lt;p&gt;You can have both Web ADF and ASP.NET AJAX controls on the page. The challenge is doing something like the example above, where controls in an UpdatePanel communicate with Web ADF controls. This post shows one approach for this. It turns out that it takes less than a dozen lines of code beyond what would have been needed had the Map been inside the UpdatePanel! You can follow along if you have installed Visual Studio 2005, the Web ADF, and the &lt;a href="http://ajax.asp.net/" target="_blank"&gt;ASP.NET AJAX&lt;/a&gt; 1.0 extensions. &lt;/p&gt;&lt;h3&gt;Add the controls&lt;/h3&gt;&lt;p&gt;I first created a new website using the &amp;quot;ASP.NET AJAX-Enabled Web Site&amp;quot; template in Visual Studio. This creates a website and adds some extra items to support AJAX into both the Default.aspx page and the web.config file. You&amp;#39;ll notice the ScriptManager control already added to the Default.aspx page, which is a non-visual control that handles the AJAX functionality. If you wanted to add ASP.NET AJAX into an existing page or website, you&amp;#39;d need to add these same items that the template adds in. See the ASP.NET AJAX documentation for details.&lt;/p&gt;&lt;p&gt;&lt;img alt="ASP.NET AJAX and Web ADF controls on the page" height="441" src="http://10.35.2.42/blogimages/APR-2-2007/AjaxADFDemoPage.gif" style="float:right;" width="350" /&gt; On the Default.aspx page, I added an UpdatePanel from the AJAX Extensions toolbox tab. I dragged two standard DropDownList controls into the UpdatePanel. The first DropDownList will display a list of layers. We could obtain these from the Web ADF controls on page startup, but I just added them manually for now to the Items property. I added two items: Cities and Countries. I also set the AutoPostBack property for both DropDownList controls to True. We need to do this to trigger a postback (actually a &amp;quot;partial postback&amp;quot; as ASP.NET AJAX calls it) when the user changes the selection.&lt;/p&gt;&lt;p&gt;Next I added a Map control and a MapResourceManager control from the ArcGIS Web Controls. Tip: having a drop-down list just above the map inteferes with the drop-down&amp;#39;s functioning, so I put the map above the drop-down lists for this demo. I set the MapResourceManager property of the Map, and I added a resource item (map service) to the MapResourceManager as required to enable the map to display the service. In my case I used a world map with cities and countries. My simple page looks like the example here.&lt;/p&gt;&lt;h3&gt;Update DropDownList items with ASP.NET AJAX&lt;/h3&gt;&lt;p&gt;When the user changes the first drop-down list, the second list should display a list of cities or countries. Using ASP.NET AJAX allows us to treat this like a standard postback event. Behind the scenes, ASP.NET AJAX handles the request using AJAX methods rather than a full postback. Fortunately we don&amp;#39;t have to deal with those details here. &lt;/p&gt;&lt;p&gt;I double-clicked on the DropDownList1 on the design page, which creates the method to handle the user selection in the code-behind page. We need to also fill the second DropDownList at startup, so we&amp;#39;ll create a separate method and call it from both the drop-down&amp;#39;s change method and the Page load method (which we can create by double-clicking on the design page). The UpdatePlaceList method fills the second DropDownList with locations and coordinates that we&amp;#39;ll use later for zooming the map. The code below is in VB; both C# and VB versions are available in the download link at the end of this post.&lt;/p&gt;&lt;pre style="font-family:Courier New;background-color:#eeeeee;border:#999999 thin solid;"&gt;Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load&lt;br /&gt;
    If Not Page.IsPostBack Then&lt;br /&gt;
        UpdatePlaceList()&lt;br /&gt;
    End If&lt;br /&gt;
End Sub&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Protected Sub DropDownList1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs)&lt;br /&gt;
    UpdatePlaceList()&lt;br /&gt;
End Sub&lt;br /&gt;
&lt;br /&gt;
Sub UpdatePlaceList()&lt;br /&gt;
    DropDownList2.Items.Clear()&lt;br /&gt;
    If DropDownList1.SelectedValue = &amp;quot;Cities&amp;quot; Then&lt;br /&gt;
        DropDownList2.Items.Add(New ListItem(&amp;quot;Cape Town&amp;quot;, &amp;quot;17|-36|21|-32&amp;quot;))&lt;br /&gt;
        DropDownList2.Items.Add(New ListItem(&amp;quot;Oslo&amp;quot;, &amp;quot;9|58|13|62&amp;quot;))&lt;br /&gt;
        DropDownList2.Items.Add(New ListItem(&amp;quot;Washington&amp;quot;, &amp;quot;-79|37|-75|41&amp;quot;))&lt;br /&gt;
    ElseIf DropDownList1.SelectedValue = &amp;quot;Countries&amp;quot; Then&lt;br /&gt;
        DropDownList2.Items.Add(New ListItem(&amp;quot;Australia&amp;quot;, &amp;quot;112|-43|157|-10&amp;quot;))&lt;br /&gt;
        DropDownList2.Items.Add(New ListItem(&amp;quot;Brazil&amp;quot;, &amp;quot;-73|-33|-31|6&amp;quot;))&lt;br /&gt;
        DropDownList2.Items.Add(New ListItem(&amp;quot;China&amp;quot;, &amp;quot;75|16|136|55&amp;quot;))&lt;br /&gt;
    End If&lt;br /&gt;
&lt;br /&gt;
End Sub&lt;br /&gt;
&lt;br /&gt;
    &lt;/pre&gt;&lt;h3&gt;Zoom the Map when user selects a place&lt;/h3&gt;&lt;p&gt;When the user selects a place in the second DropDownList, we need to zoom the map to the coordinates of that place. The challenge is to have the map&amp;#39;s new extent be communicated to the client. Since the Map control cannot be in the UpdatePanel, we have to use another approach to communicate the results of the extent change to the Map.&lt;/p&gt;&lt;p&gt;The user selection in DropDownList2 triggers another partial postback. To set up the code for this, I double-clicked on DropDownList2 in design mode to create the method to handle the selected-index change. Inside this new method, I obtained the coordinates to zoom to from the DropDownList2.SelectedValue property. I parsed this value into an array of coordinate values, created a new envelope, and set the envelope&amp;#39;s extent to these coordinates. I then set the Map&amp;#39;s extent to this new envelope. This changes the map extent on the server. However, the client won&amp;#39;t be aware of the change and won&amp;#39;t obtain a new map unless we tell it to.&lt;/p&gt;&lt;p&gt;To get the client to update the map, we use a feature in ASP.NET AJAX to pass information to the client. The &lt;a href="http://ajax.asp.net/docs/mref/M_System_Web_UI_ScriptManager_RegisterDataItem_2_b343477c.aspx" target="_blank"&gt;ScriptManager.RegisterDataItem&lt;/a&gt; method adds information that will be passed back and evaluated on the client.&lt;/p&gt;&lt;p&gt;The Map&amp;#39;s &lt;a href="http://edndoc.esri.com/arcobjects/9.2/net_api_ref/ADFWeb/ESRI.ArcGIS.ADF.Web.UI.WebControls~ESRI.ArcGIS.ADF.Web.UI.WebControls.CallbackResult.html" target="_blank"&gt;CallbackResults&lt;/a&gt; will have the information required to update the map on the client. We pass this information to the client using the RegisterDataItem method. We&amp;#39;ll see shortly how the client uses this information to update the map.&lt;/p&gt;&lt;p&gt;The code below obtains the callback results and registers them with the ASP.NET AJAX RegisterDataItem method. The &lt;a href="http://ajax.asp.net/docs/mref/P_System_Web_UI_ScriptManager_IsInAsyncPostBack.aspx" target="_blank"&gt;ScriptManager1.IsInAsyncPostBack&lt;/a&gt; property ensures that we&amp;#39;re doing an AJAX partial postback rather than a full page postback.&lt;/p&gt;&lt;pre style="font-family:Courier New;background-color:#eeeeee;border:#999999 thin solid;"&gt;Protected Sub DropDownList2_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs)&lt;br /&gt;
&lt;br /&gt;
    Dim zoomString As String = DropDownList2.SelectedValue&lt;br /&gt;
    Dim coordArr() As String = zoomString.Split(&amp;quot;|&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    Dim new_extent As New ESRI.ArcGIS.ADF.Web.Geometry.Envelope&lt;br /&gt;
    new_extent.XMin = Double.Parse(coordArr(0))&lt;br /&gt;
    new_extent.YMin = Double.Parse(coordArr(1))&lt;br /&gt;
    new_extent.XMax = Double.Parse(coordArr(2))&lt;br /&gt;
    new_extent.YMax = Double.Parse(coordArr(3))&lt;br /&gt;
    Map1.Extent = new_extent&lt;br /&gt;
&lt;br /&gt;
    If ScriptManager1.IsInAsyncPostBack Then&lt;br /&gt;
        Dim callbackString As String = Map1.CallbackResults.ToString()&lt;br /&gt;
        ScriptManager1.RegisterDataItem(Map1, callbackString)&lt;br /&gt;
    End If&lt;br /&gt;
&lt;br /&gt;
End Sub&lt;br /&gt;
&lt;br /&gt;
    &lt;/pre&gt;&lt;h3&gt;Handle the results on the client&lt;/h3&gt;&lt;p&gt;The results that we just registered with ScriptManager need to be handled on the client. ASP.NET AJAX has a &lt;a href="http://ajax.asp.net/docs/overview/AJAXClientEvents.aspx" target="_blank"&gt;handler approach&lt;/a&gt; to process items passed back to the client. I inserted the code below into the .aspx page, at a point below the asp:ScriptManager tag. This code registers a client-side handler, the PageLoadingHandler function, that will run when the page loads. This handler obtains the items registered on the server with RegisterDataItem, and checks whether any items for the map control are present. &amp;nbsp;Since our server-side code added an item for the map, the code runs the next line.&lt;/p&gt;&lt;p&gt;This next line calls processCallbackResult and passes it the callback results we registered on the server. The processCallbackResult function is part of the Web ADF JavaScript library, which is automatically downloaded when the page uses Web ADF controls. The processCallbackResult function applies the callback results on the client by retrieving a new map. One caveat: the objects and methods in the client-side library can change, so this method could change with future versions of the Web ADF.&lt;/p&gt;&lt;pre style="font-family:Courier New;background-color:#eeeeee;border:#999999 thin solid;"&gt;&amp;lt;asp:ScriptManager ID=&amp;quot;ScriptManager1&amp;quot; runat=&amp;quot;server&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;script type=&amp;quot;text/javascript&amp;quot; language=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    Sys.WebForms.PageRequestManager.getInstance().add_pageLoading(PageLoadingHandler);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    function PageLoadingHandler(sender, args) {&lt;br /&gt;
        var dataItems = args.get_dataItems();&lt;br /&gt;
        if (dataItems[&amp;#39;Map1&amp;#39;] != null)&lt;br /&gt;
            processCallbackResult(dataItems[&amp;#39;Map1&amp;#39;], &amp;#39;Map1&amp;#39;);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/pre&gt;&lt;p&gt;With this code in place, when the user selects an item in the places drop-down list, the server sets the map extent to that place, and the map on the client gets notified to retrieve a new map.&lt;/p&gt;&lt;p&gt;Tip: be careful about dragging controls around the page in Design mode when script blocks are within the page body. Doing so caused Visual Studio to remove my script block, which disabled the map update since no handler was available on the client!&lt;/p&gt;&lt;h3&gt;Conclusion&lt;/h3&gt;&lt;p&gt;We&amp;#39;ve seen how you can use controls in an ASP.NET AJAX UpdatePanel to control a Map in the Web ADF. Although it takes more work than if the Web ADF controls were embedded in the UpdatePanel, it is possible to do these tasks now. In our case it required less than a dozen lines of additional code compared to when the controls are all inside the UpdatePanel. &lt;/p&gt;&lt;p&gt;&lt;a href="http://10.35.2.42/blogimages/APR-2-2007/AjaxADFDemo.zip" target="_blank"&gt;Download the code for this demo (includes C# and VB)&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Try it out &lt;a href="http://serverx.esri.com/ajaxadfdemo/AjaxADFDemoCS.aspx" target="_blank"&gt;here&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;&lt;img src="http://serverx.esri.com/ESRIBlogs/aggbug.aspx?PostID=166" width="1" height="1"&gt;</content><author><name>Jeremy</name><uri>http://serverx.esri.com/ESRIBlogs/members/Jeremy.aspx</uri></author><category term="ADF" scheme="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/ADF/default.aspx" /><category term=".NET" scheme="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/.NET/default.aspx" /><category term="Code Snippet" scheme="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/Code+Snippet/default.aspx" /><category term="AJAX" scheme="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/AJAX/default.aspx" /></entry><entry><title>Using custom logos in ArcGIS Explorer</title><link rel="alternate" type="text/html" href="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/2007/03/19/Using-custom-logos-in-ArcGIS-Explorer.aspx" /><id>http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/2007/03/19/Using-custom-logos-in-ArcGIS-Explorer.aspx</id><published>2007-03-19T17:00:00Z</published><updated>2007-03-19T17:00:00Z</updated><content type="html">&lt;p&gt;Mark Bockenhauer of the ArcGIS Explorer team contributed the following post on how to display a custom logo in ArcGIS Explorer.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;img border="1" height="450" src="http://serverx.esri.com/blogimages/MAR-15-2007/customlogo.PNG" width="616" /&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;It is common with paper maps to display a logo perhaps a company logo or government seal.&amp;nbsp; The same can be done on digital ArcGIS Explorer maps by leveraging the Home Server.&lt;br /&gt;&lt;br /&gt;The Home Server is a user defined server that ArcGIS Explorer connects to when it starts up.&amp;nbsp; Typically ArcGIS Explorer checks the home server to see if its version is up to date and to get the default map to display.&amp;nbsp; It does this by referencing information in the &amp;lsquo;explorer&amp;rsquo; folder on the server. This folder is part of the ArcGIS Server install.&lt;br /&gt;&lt;br /&gt;Download the &lt;a href="http://serverx.esri.com/blogimages/MAR-15-2007/explorer.zip" target="_blank"&gt;explorer.zip&lt;/a&gt; folder before continuing with this example.&amp;nbsp; This folder contains example resources for all of the ArcGIS Server Home Server settings that can be applied to ArcGIS Explorer.&lt;br /&gt;&lt;br /&gt;Once you have downloaded the file unzip it and place it in the appropriate location on your server. &lt;br /&gt;&lt;/p&gt;&lt;p&gt;Default Locations:&lt;br /&gt;.NET&amp;nbsp; C:\Inetpub\wwwroot\ArcGIS\Explorer&lt;br /&gt;JAVA&amp;nbsp;&amp;nbsp; C:\Program Files\ArcGIS\java\web_output\Explorer&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To display your own custom logo on ArcGIS Explorer applications that specify your server as their home server you will need to modify the following files:&lt;br /&gt;&lt;br /&gt;explorer\config\e2config.xml&lt;br /&gt;explorer\skins\example_skin_file.xml&lt;br /&gt;&lt;br /&gt;In the e2config.xml file the &amp;lt;skins&amp;gt; section is commented out (highlighted in bold below).&amp;nbsp; Un-comment this section by removing &amp;ldquo;&amp;lt;!- -&amp;ldquo; prior to the section and &amp;ldquo;- -&amp;gt;&amp;rdquo; following the section.&amp;nbsp; You will also want type in the appropriate URL for the &amp;lt;skinurl&amp;gt; tag.&amp;nbsp;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:blue;"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:maroon;"&gt;xml&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:blue;"&gt; &lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:red;"&gt;version&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:blue;"&gt;=&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&amp;quot;&lt;span style="color:blue;"&gt;1.0&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;encoding&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;UTF-8&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;standalone&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;yes&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:maroon;"&gt;E2Config&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:blue;"&gt;
&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:red;"&gt;xmlns:xsd&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:blue;"&gt;=&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&amp;quot;&lt;span style="color:blue;"&gt;http://www.w3.org/2001/XMLSchema&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:red;"&gt;xmlns:xsi&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;http://www.w3.org/2001/XMLSchema-instance&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:blue;"&gt;&lt;span&gt;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:maroon;"&gt;Permissions&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:blue;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:maroon;"&gt;AddData&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;true&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;AddData&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:blue;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:maroon;"&gt;OpenDocument&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;true&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;OpenDocument&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:blue;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:maroon;"&gt;SaveDocument&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;true&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;SaveDocument&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:blue;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:maroon;"&gt;ManageLayers&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;true&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;ManageLayers&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:blue;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:maroon;"&gt;ManageTasks&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;true&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;ManageTasks&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:blue;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:maroon;"&gt;DisplayOptions&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;true&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;DisplayOptions&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:blue;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:maroon;"&gt;PerformVersionCheck&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;true&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;PerformVersionCheck&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:blue;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:maroon;"&gt;TaskDownloadInternet&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;true&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;TaskDownloadInternet&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:blue;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:maroon;"&gt;TaskDownloadLocalIntranet&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;true&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;TaskDownloadLocalIntranet&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:blue;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:maroon;"&gt;TaskDownloadTrustedSites&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;true&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon;"&gt;TaskDownloadTrustedSites&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:blue;"&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:maroon;"&gt;Permissions&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:blue;"&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&amp;lt;!--&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:green;"&gt; To use a server skin
file, uncomment the &amp;#39;skins&amp;#39; tags below by removing the exclamation point and
hyphens.&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:green;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Type your server name into the
skin url. The server install contains an example skin file and resources &lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:blue;"&gt;--&amp;gt;&lt;/span&gt;&lt;/p&gt;



&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:blue;"&gt;&amp;nbsp;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&amp;lt;!--&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:green;"&gt;&amp;lt;skins&amp;gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:green;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&amp;lt;skinfile&amp;gt;example_skin_file.xml&amp;lt;/skinfile&amp;gt; &lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:green;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&amp;lt;skinurl&amp;gt;http://TYPE_IN_YOUR_SERVER_NAME_HERE/arcgis/explorer/skins/&amp;lt;/skinurl&amp;gt;
&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:green;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;/skins&amp;gt;&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:blue;"&gt;--&amp;gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:maroon;"&gt;E2Config&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:blue;"&gt;&lt;/span&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;Next we will modify the skin file referenced in the &amp;lt;skins&amp;gt; tags to display the desired logo. In the explorer\skins\example_skin_file you will see that all of the lines are commented out.&amp;nbsp; You will also notice that there are two sections to the file.&amp;nbsp; The tags in the upper section all control the ArcGIS Explorer color scheme.&amp;nbsp; The tags in the lower section pertain to ArcGIS Explorer graphic elements.&amp;nbsp; Un-comment this section.&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:blue;"&gt;&amp;lt;!--&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:green;"&gt; &lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:green;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;HUDFont
type=&amp;quot;Font&amp;quot;&amp;gt;Verdana&amp;lt;/HUDFont&amp;gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:green;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;ApplicationTitle
type=&amp;quot;Application&amp;quot;&amp;gt;ExampleApplicationTitle&amp;lt;/ApplicationTitle&amp;gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:green;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;DocumentPrefix
type=&amp;quot;Application&amp;quot;&amp;gt;ExampleDocumentPrefix&amp;lt;/DocumentPrefix&amp;gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:green;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;SplashScreenBitmap
type=&amp;quot;Application&amp;quot;&amp;gt;example_splash_screen.png&amp;lt;/SplashScreenBitmap&amp;gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:green;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;SplashMessageCoords
type=&amp;quot;Application&amp;quot;&amp;gt;15,200&amp;lt;/SplashMessageCoords&amp;gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:green;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;DisplayCustomLogo
type=&amp;quot;Application&amp;quot;&amp;gt;example_custom_logo.png&amp;lt;/DisplayCustomLogo&amp;gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:green;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;DisplayCustomLogoMaskColor
type=&amp;quot;Application&amp;quot;&amp;gt;RGB(255, 0,
255)&amp;lt;/DisplayCustomLogoMaskColor&amp;gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:green;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&amp;lt;DisplayCustomLogoTransparency
type=&amp;quot;Application&amp;quot;&amp;gt;75&amp;lt;/DisplayCustomLogoTransparency&amp;gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:green;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;NorthArrowBitmap
type=&amp;quot;Application&amp;quot;&amp;gt;example_north_arrow.png&amp;lt;/NorthArrowBitmap&amp;gt;
&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:green;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:blue;"&gt;--&amp;gt;&lt;/span&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;At this point if you start ArcGIS Explorer and specify your server as the Home Server, you will see the Example Custom Logo.&lt;br /&gt;&lt;br /&gt;Setting the Home Server to your server.&lt;br /&gt;1.&amp;nbsp;&amp;nbsp;&amp;nbsp; In Explorer, click File &amp;gt; Set Home Server &lt;br /&gt;2.&amp;nbsp;&amp;nbsp;&amp;nbsp; Click &amp;ldquo;Connect to the Home Server located at&amp;rdquo;, then enter the URL to your server in the format http://&amp;lt;server name&amp;gt;/&amp;lt;instance name&amp;gt; (Example: http://myServer/ArcGIS) &lt;br /&gt;3.&amp;nbsp;&amp;nbsp;&amp;nbsp; Click the Test button to test the connection, or click OK to return to Explorer. &lt;br /&gt;ArcGIS Explorer will restart and apply the Home Server Settings.&lt;br /&gt;&lt;br /&gt;To use your own logo you will want to change the .PNG referenced in the &amp;lt;DisplayCustomLogo&amp;gt; tag.&amp;nbsp; Your .PNG file should be located in the skins folder with the skin file.&lt;br /&gt;&lt;br /&gt;Notice that the example logo makes use of the &amp;lt;DisplayCustomLogoMaskColor&amp;gt; to display a rectangular logo.&lt;br /&gt;&lt;br /&gt;Actual .PNG on the left, what is displayed on the Right.&lt;/p&gt;&lt;p&gt;&lt;img border="1" height="260" src="http://serverx.esri.com/blogimages/MAR-15-2007/pink.PNG" width="260" /&gt;&amp;nbsp;&amp;nbsp; &lt;img border="1" height="39" src="http://serverx.esri.com/blogimages/MAR-15-2007/newlogo.PNG" width="127" /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;For more information on making your server the ArcGIS Explorer Home Server see &amp;quot;Making your system an ArcGIS Explorer Home Server&amp;quot; under &amp;quot;Administering the Server&amp;quot; at:&amp;nbsp; &lt;a href="http://webhelp.esri.com/arcgisserver/9.2/dotNet/" target="_blank"&gt;http://webhelp.esri.com/arcgisserver/9.2/dotNet/&lt;/a&gt;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://serverx.esri.com/ESRIBlogs/aggbug.aspx?PostID=162" width="1" height="1"&gt;</content><author><name>Jeremy</name><uri>http://serverx.esri.com/ESRIBlogs/members/Jeremy.aspx</uri></author><category term="ArcGIS Explorer" scheme="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/ArcGIS+Explorer/default.aspx" /></entry><entry><title>Working with the Web ADF resources in a custom task at run-time</title><link rel="alternate" type="text/html" href="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/2007/02/12/Working-with-the-Web-ADF-components-at-run_2D00_time.aspx" /><id>http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/2007/02/12/Working-with-the-Web-ADF-components-at-run_2D00_time.aspx</id><published>2007-02-12T19:27:00Z</published><updated>2007-02-12T19:27:00Z</updated><content type="html">&lt;p&gt;Rex Hansen of the .NET SDK team wrote this very useful post on accessing the Web ADF components at run-time. &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;When creating a custom task, you may often find it necessary to access Web ADF components (controls, resources, etc.) that share the same Web page with the task.&amp;nbsp; How the task will be used will dictate the technique for accessing Web ADF components.&amp;nbsp; There are three situations to consider:&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;1) Task run-time&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;2) Visual Studio design-time&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;3) Manager run-time&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;&amp;ldquo;Task run-time&amp;rdquo; defines the technique for working with Web ADF components in a Web application at run-time.&amp;nbsp; &amp;ldquo;Visual Studio design-time&amp;rdquo; uses custom verbs on the custom task control to access to Web ADF components during task configuration in Visual Studio.&amp;nbsp; &amp;ldquo;Manager run-time&amp;rdquo; defines a situation where a custom task must utilize Web ADF components when configuring the task in the Manager Web application.&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;This discussion and walkthrough will focus on working with Web ADF resources in a custom task at run-time (situation 1).&amp;nbsp; The custom task will do the following:&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;ul style="margin-top:0in;"&gt;&lt;li class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;Extend FloatingPanelTask&lt;/span&gt; &lt;span style="font-size:10pt;font-family:Arial;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;Expose a public property to buddy the task with a MapResourceManager &lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;Use a DropDownList control to list the map resources in the MapResourceManager control&lt;/span&gt; &lt;span style="font-size:10pt;font-family:Arial;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;Populate the DropDownList upon initial load of the task&lt;/span&gt; &lt;span style="font-size:10pt;font-family:Arial;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;1) Create a custom task control that extends FloatingPanelTask.&amp;nbsp; As a composite control, the custom task will contain multiple controls.&amp;nbsp; Define two private member variables to store references to controls that will be used in the custom task.&amp;nbsp; In this case, a Label will be used to display the MapResourceManager id and a DropDownList will display a list of map resources.&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:navy;font-family:Arial;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;namespace TestTask_CSharp&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;{&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public class TestTask_Demo : FloatingPanelTask&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private Label label = null;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private DropDownList dropDownListResources = null;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:navy;font-family:Arial;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;2) Create a property on the custom task control to store a reference to the unique id of a MapResourceManager control.&amp;nbsp; The property will be maintained in state for the duration of a user session.&amp;nbsp; The property can be set declaratively in the aspx page using the MapResourceManagerID attribute (source view).&amp;nbsp; &lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:navy;font-family:Arial;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Browsable(true)]&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [DefaultValue(&amp;quot;&amp;quot;)]&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [PersistenceMode(PersistenceMode.Attribute)]&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public string MapResourceManagerID&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; get&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; object obj = StateManager.GetProperty(&amp;quot;mapResourceManagerID&amp;quot;);&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (obj == null) return &amp;quot;&amp;quot;;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return obj as string;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; StateManager.SetProperty(&amp;quot;mapResourceManagerID&amp;quot;, value);&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;span style="font-size:10pt;color:navy;font-family:Arial;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:navy;font-family:Arial;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;3) As with other composite Web controls, override the CreateChildControls method to construct the custom task control at runtime.&amp;nbsp; The Label and DropDownList are created and added to the custom task.&amp;nbsp; Note the DropDownList is empty.&amp;nbsp; The Controls property is inherited from the System.Web.UI.WebControls.CompositeControl class and maintains a collection of controls to be rendered at runtime.&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:navy;font-family:Arial;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; protected override void CreateChildControls()&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Controls.Clear();&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; base.CreateChildControls();&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; label = new Label();&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; label.Text = MapResourceManagerID;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; label.ID = &amp;quot;label_mrm&amp;quot;;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dropDownListResources = new DropDownList();&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dropDownListResources.ID = &amp;quot;dropdownlist_resources&amp;quot;;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Controls.Add(label);&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Controls.Add(dropDownListResources);&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:navy;font-family:Arial;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:navy;font-family:Arial;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;4) At this time we only need to populate the DropDownList (dropDownListResources) with a list of map resources upon initial load of the custom task.&amp;nbsp; Since interrogating the MapResourceManager to get a list of resources during every callback is not necessary and can be expensive, we only want it to occur during a full page postback.&amp;nbsp; The PreRender step in the page lifecycle offers a good location to modify page or control content before the final rendering step, and it&amp;#39;s only called during a full page postback.&amp;nbsp; Override the OnPreRender event of the custom task control and call the UpdateResourceDropDownList() method.&amp;nbsp; The method will contain the logic to update the dropDownListResources control.&amp;nbsp; This logic was placed in a separate method so it can be called from other locations in the custom task code, if necessary in the future.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:navy;font-family:Arial;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;protected override void OnPreRender(EventArgs e)&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; base.OnPreRender(e);&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;UpdateResourceDropDownList();&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:navy;font-family:Arial;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;5) The UpdateResourceDropDownList() method uses the MapResourceManagerID property to find a MapResourceManager control on the page and get a list of map resources.&amp;nbsp; The GetMapResourcesFromMRM() method returns a collection of resources from the MapResourceManager.&amp;nbsp; If the MapResourceManager has not been initialized, it will be explicitly initialized. Including code to return a collection of resources from a MapResourceManager was placed in a separate method so it can be called from other locations in the custom task that do not involve the dropDownListResources control.&amp;nbsp; Once a list of resources is returned to the UpdateResourceDropDownList method, only those that are an ArcGIS Server map resource are added to the dropDownListResources control.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:navy;font-family:Arial;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; protected void UpdateResourceDropDownList()&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (!string.IsNullOrEmpty(MapResourceManagerID))&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GISResourceCollection grcoll = GetMapResourcesFromMRM(MapResourceManagerID);&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach (IGISResource gr in grcoll)&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (gr is ESRI.ArcGIS.ADF.Web.DataSources.ArcGISServer.MapResourceBase)&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dropDownListResources.Items.Add(gr.Name);&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; protected GISResourceCollection GetMapResourcesFromMRM(string mrmID)&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GISResourceCollection gisRC = new GISResourceCollection();&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MapResourceManager rm = (MapResourceManager)Page.FindControl(mrmID);&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (rm == null)&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return null;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (!rm.Initialized)&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rm.Initialize();&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach (MapResourceItem mri in rm.ResourceItems)&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;gisRC.Add(mri.Resource);&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier N