<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://serverx.esri.com/ESRIBlogs/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>ArcGIS Server Development Blog</title><link>http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/default.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2.1 (Build: 60809.935)</generator><item><title>The ArcGIS Server Development Blog has moved</title><link>http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/2007/05/09/The-ArcGIS-Server-Development-Blog-has-moved.aspx</link><pubDate>Wed, 09 May 2007 16:00:00 GMT</pubDate><guid isPermaLink="false">b60b3f0a-e2bd-4be5-8a18-822c697649ab:209</guid><dc:creator>Sterling</dc:creator><slash:comments>0</slash:comments><comments>http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/comments/209.aspx</comments><wfw:commentRss>http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/commentrss.aspx?PostID=209</wfw:commentRss><description>&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;</description></item><item><title>Follow-up to Extending the QueryAttributes Task: Zooming to selected features</title><link>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</link><pubDate>Thu, 03 May 2007 19:15:00 GMT</pubDate><guid isPermaLink="false">b60b3f0a-e2bd-4be5-8a18-822c697649ab:189</guid><dc:creator>Sterling</dc:creator><slash:comments>4</slash:comments><comments>http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/comments/189.aspx</comments><wfw:commentRss>http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/commentrss.aspx?PostID=189</wfw:commentRss><description>&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;</description><category domain="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/ADF/default.aspx">ADF</category><category domain="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/.NET/default.aspx">.NET</category><category domain="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/Code+Snippet/default.aspx">Code Snippet</category><category domain="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/Tasks/default.aspx">Tasks</category></item><item><title>Customizing the Web Editor task</title><link>http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/2007/05/02/Customizing-the-Web-Editor-task.aspx</link><pubDate>Wed, 02 May 2007 17:30:00 GMT</pubDate><guid isPermaLink="false">b60b3f0a-e2bd-4be5-8a18-822c697649ab:184</guid><dc:creator>Sterling</dc:creator><slash:comments>17</slash:comments><comments>http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/comments/184.aspx</comments><wfw:commentRss>http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/commentrss.aspx?PostID=184</wfw:commentRss><description>&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;</description><category domain="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/ADF/default.aspx">ADF</category><category domain="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/.NET/default.aspx">.NET</category><category domain="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/Tasks/default.aspx">Tasks</category><category domain="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/92+SP2/default.aspx">92 SP2</category></item><item><title>How to track pending tiles and display a busy indicator in a Web mapping application</title><link>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</link><pubDate>Tue, 01 May 2007 19:05:00 GMT</pubDate><guid isPermaLink="false">b60b3f0a-e2bd-4be5-8a18-822c697649ab:181</guid><dc:creator>Sterling</dc:creator><slash:comments>6</slash:comments><comments>http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/comments/181.aspx</comments><wfw:commentRss>http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/commentrss.aspx?PostID=181</wfw:commentRss><description>&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;</description><category domain="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/ADF/default.aspx">ADF</category><category domain="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/.NET/default.aspx">.NET</category><category domain="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/Code+Snippet/default.aspx">Code Snippet</category><category domain="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/AJAX/default.aspx">AJAX</category><category domain="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/92+SP2/default.aspx">92 SP2</category></item><item><title>Configuring your server to display a &quot;Data not available&quot; tile for empty map cache areas</title><link>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</link><pubDate>Thu, 12 Apr 2007 16:00:00 GMT</pubDate><guid isPermaLink="false">b60b3f0a-e2bd-4be5-8a18-822c697649ab:177</guid><dc:creator>Jeremy</dc:creator><slash:comments>2</slash:comments><comments>http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/comments/177.aspx</comments><wfw:commentRss>http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/commentrss.aspx?PostID=177</wfw:commentRss><description>&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;</description><category domain="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/ADF/default.aspx">ADF</category><category domain="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/Map+Cache/default.aspx">Map Cache</category></item><item><title>Using ASP.NET AJAX with the Web ADF</title><link>http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/2007/04/02/Using-ASP.NET-AJAX-with-the-Web-ADF.aspx</link><pubDate>Mon, 02 Apr 2007 14:21:00 GMT</pubDate><guid isPermaLink="false">b60b3f0a-e2bd-4be5-8a18-822c697649ab:166</guid><dc:creator>Jeremy</dc:creator><slash:comments>11</slash:comments><comments>http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/comments/166.aspx</comments><wfw:commentRss>http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/commentrss.aspx?PostID=166</wfw:commentRss><description>&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;</description><category domain="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/ADF/default.aspx">ADF</category><category domain="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/.NET/default.aspx">.NET</category><category domain="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/Code+Snippet/default.aspx">Code Snippet</category><category domain="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/AJAX/default.aspx">AJAX</category></item><item><title>Using custom logos in ArcGIS Explorer</title><link>http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/2007/03/19/Using-custom-logos-in-ArcGIS-Explorer.aspx</link><pubDate>Mon, 19 Mar 2007 17:00:00 GMT</pubDate><guid isPermaLink="false">b60b3f0a-e2bd-4be5-8a18-822c697649ab:162</guid><dc:creator>Jeremy</dc:creator><slash:comments>4</slash:comments><comments>http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/comments/162.aspx</comments><wfw:commentRss>http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/commentrss.aspx?PostID=162</wfw:commentRss><description>&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;</description><category domain="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/ArcGIS+Explorer/default.aspx">ArcGIS Explorer</category></item><item><title>Working with the Web ADF resources in a custom task at run-time</title><link>http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/2007/02/12/Working-with-the-Web-ADF-components-at-run_2D00_time.aspx</link><pubDate>Mon, 12 Feb 2007 19:27:00 GMT</pubDate><guid isPermaLink="false">b60b3f0a-e2bd-4be5-8a18-822c697649ab:102</guid><dc:creator>Jeremy</dc:creator><slash:comments>0</slash:comments><comments>http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/comments/102.aspx</comments><wfw:commentRss>http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/commentrss.aspx?PostID=102</wfw:commentRss><description>&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 New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return gisRC;&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;font-family:Arial;"&gt;6) Override a set of methods associated with task implementation to complete the custom task control.&amp;nbsp; Further details on these methods will be provided in future blog posts.&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; public override string GetCallbackResult()&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; return base.GetCallbackResult();&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; public override void ExecuteTask()&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; public override List&amp;lt;GISResourceItemDependency&amp;gt; GetGISResourceItemDependencies()&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; List&amp;lt;GISResourceItemDependency&amp;gt; list = new List&amp;lt;GISResourceItemDependency&amp;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; return list;&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; }&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: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;7) Build the custom task in Visual Studio and add a reference to it in a Web page.&amp;nbsp; Add the custom task and a MapResourceManager control to the page.&amp;nbsp; Add one or more ArcGIS Server resources to the MapResourceManager.&amp;nbsp; Run the Web app and you should see a drop down list containing the name of each ArcGIS Server map resource item in the MapResourceManager.&amp;nbsp; &amp;nbsp;&amp;nbsp;It should look similar to the following screenshot:&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;img border="1" height="514" src="http://serverx.esri.com/blogimages/Feb-12-2007/taskruntime.PNG" width="465" /&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;You can download the sample &lt;a href="http://serverx.esri.com/blogimages/Feb-12-2007/TestTask.zip" target="_blank"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&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;img src="http://serverx.esri.com/ESRIBlogs/aggbug.aspx?PostID=102" width="1" height="1"&gt;</description><category domain="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/ADF/default.aspx">ADF</category><category domain="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/.NET/default.aspx">.NET</category><category domain="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/Code+Snippet/default.aspx">Code Snippet</category><category domain="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/Tasks/default.aspx">Tasks</category></item><item><title>Extending the QueryAttributesTask to highlight selected features</title><link>http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/2007/02/12/Extending-the-QueryAttributesTask-to-highlight-selected-features.aspx</link><pubDate>Mon, 12 Feb 2007 17:50:00 GMT</pubDate><guid isPermaLink="false">b60b3f0a-e2bd-4be5-8a18-822c697649ab:94</guid><dc:creator>Jeremy</dc:creator><slash:comments>11</slash:comments><comments>http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/comments/94.aspx</comments><wfw:commentRss>http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/commentrss.aspx?PostID=94</wfw:commentRss><description>&lt;p&gt;Bryan Baker of the .NET SDK team wrote the following great post on extending a task to modify its behavior and then adding that task to the .NET Global Assembly Cache so it can be reused across applications.&amp;nbsp; &lt;/p&gt;&lt;p&gt;Note: Also see the &lt;a 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"&gt;follow-up to this post&lt;/a&gt; from May 3, 2007.&lt;/p&gt;&lt;h1&gt;Highlighting all task results&lt;/h1&gt;&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;With the Web ADF at 9.2, a website can have one or more tasks to allow users to find features or locations on the map. For example, you might add a QueryAttributesTask to the website to allow users to find cities by name, by typing the first few characters in the name. &lt;/p&gt;&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;The out-of-the-box tasks at 9.2 do not automatically highlight found features on the map. Instead, the user can highlight features by clicking individual check-boxes of features in the task results (see graphic, with two cities selected).&lt;/p&gt;&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;img align="middle" border="1" height="118" src="http://serverx.esri.com/blogimages/Feb-12-2007/highlightgraphic.PNG" width="200" /&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;What if you want to have all features highlighted immediately when the task runs? There is currently no setting to enable this. But such immediate highlighting is possible through customization. Let&amp;rsquo;s look at one relatively easy approach for someone with modest programming skills. We&amp;rsquo;re looking specifically at the Web ADF for the Microsoft .NET Framework here, by the way.&lt;/p&gt;&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;We will &lt;em&gt;extend&lt;/em&gt; a task control to modify its behavior. The object-oriented nature of .NET allows us to create a new class (a task, in this case) that &lt;em&gt;inherits&lt;/em&gt; all of the behavior and properties of the original class. We only need to add or modify the original class where we need it to act differently from the original class (task). Some aspects of tasks may be difficult or impossible to change, but modifying the task results output is not difficult.&lt;/p&gt;&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;The approach we&amp;rsquo;ll look at can apply to any task that produces a task result in the form of a graphics layer, where users can click on feature check-boxes to highlight them on the map. This includes the SearchAttributesTask, FindAddressTask, FindPlaceTask and QueryAttributesTask. We&amp;rsquo;ll look specifically at the QueryAttributesTask in this example.&lt;/p&gt;&lt;h2&gt;Extending an out-of-the-box task&lt;/h2&gt;&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;First, I open Visual Studio 2005 and create a new project (not a new website), a Class Library project to be specific. One great thing about .NET is that even though the original class was written in C#, we can extend it in any language&amp;mdash;we&amp;rsquo;ll use VB to show this here. We can put our new class library anywhere; it doesn&amp;rsquo;t have to go into a web folder. I&amp;rsquo;ll call my project QuerySelectTaskVB. By the way, we could also use either Visual Basic Express or Visual C# Express, but it&amp;rsquo;s more difficult to debug with a linked web application.&lt;/p&gt;&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;Visual Studio creates the project and adds a new class called Class1.vb. I right-clicked on it in the Solution Explorer and renamed it QuerySelectTaskVB. This also renames the class in the code view&amp;mdash;nice. &lt;/p&gt;&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;We need to add some references to the project to the libraries we&amp;rsquo;ll be using. I right-click on the project in Solution Explorer, and chose Add Reference, and in the pop up dialog I select these libraries and then click OK:&lt;/p&gt;&lt;ul style="margin-top:0in;"&gt;&lt;li class="MsoNormal"&gt;ESRI.ArcGIS.ADF.Tasks&lt;/li&gt;&lt;li class="MsoNormal"&gt;ESRI.ArcGIS.ADF.Web&lt;/li&gt;&lt;li class="MsoNormal"&gt;ESRI.ArcGIS.ADF.Web.DataSources&lt;/li&gt;&lt;li class="MsoNormal"&gt;ESRI.ArcGIS.ADF.Web.UI.WebControls&lt;/li&gt;&lt;li class="MsoNormal"&gt;System.Web&lt;/li&gt;&lt;/ul&gt;&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;To start creating our class, we add some Imports statements at the top of the class file so we can use classes without having to type the full path. We&amp;rsquo;ll also add a Namespace around our class to better identify it.&lt;/p&gt;&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="color:blue;font-family:'Courier New';"&gt;Imports&lt;/span&gt;&lt;span style="font-family:'Courier New';"&gt; System&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;font-family:'Courier New';"&gt;Imports&lt;/span&gt;&lt;span style="font-family:'Courier New';"&gt; System.ComponentModel&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;font-family:'Courier New';"&gt;Imports&lt;/span&gt;&lt;span style="font-family:'Courier New';"&gt; System.ComponentModel.Design&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;font-family:'Courier New';"&gt;Imports&lt;/span&gt;&lt;span style="font-family:'Courier New';"&gt; System.Data&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;font-family:'Courier New';"&gt;Imports&lt;/span&gt;&lt;span style="font-family:'Courier New';"&gt; System.Web&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;font-family:'Courier New';"&gt;imports&lt;/span&gt;&lt;span style="font-family:'Courier New';"&gt; System.Web.UI&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;font-family:'Courier New';"&gt;Imports&lt;/span&gt;&lt;span style="font-family:'Courier New';"&gt; ESRI.ArcGIS.ADF.Tasks&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;font-family:'Courier New';"&gt;Imports&lt;/span&gt;&lt;span style="font-family:'Courier New';"&gt; ESRI.ArcGIS.ADF.Web.Display.Graphics&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;font-family:'Courier New';"&gt;Imports&lt;/span&gt;&lt;span style="font-family:'Courier New';"&gt; ESRI.ArcGIS.ADF.Web.UI.WebControls &lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="color:blue;font-family:'Courier New';"&gt;Namespace&lt;/span&gt;&lt;span style="font-family:'Courier New';"&gt; QuerySelect&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;Public&lt;/span&gt;&lt;span style="font-family:'Courier New';"&gt; &lt;span style="color:blue;"&gt;Class&lt;/span&gt; QuerySelectTaskVB&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;End&lt;/span&gt;&lt;span style="font-family:'Courier New';"&gt; &lt;span style="color:blue;"&gt;Class&lt;/span&gt;&lt;/span&gt;&lt;span style="color:blue;font-family:'Courier New';"&gt;&lt;br /&gt;End Namespace&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;We tell the class to extend (inherit) the existing QueryAttributesTask by adding to the class declaration we&amp;rsquo;ve already created:&lt;/p&gt;&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="color:blue;font-family:'Courier New';"&gt;Public&lt;/span&gt;&lt;span style="font-family:'Courier New';"&gt; &lt;span style="color:blue;"&gt;Class&lt;/span&gt; QuerySelectTaskVB&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;Inherits&lt;/span&gt; QueryAttributesTask&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;font-family:'Courier New';"&gt;End&lt;/span&gt;&lt;span style="font-family:'Courier New';"&gt; &lt;span style="color:blue;"&gt;Class&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;The only thing we want to change in the task is how it outputs the results to the TaskResults control. The task creates this output in the standard task method called &lt;strong&gt;ExecuteTask&lt;/strong&gt;(). We want the QueryAttributesTask to create its output as usual, but we will modify the results once they&amp;rsquo;re created. So we create our own version of ExecuteTask() that &lt;em&gt;overrides&lt;/em&gt; the original. Our version will call the base (parent) class version of the method, then modify the results that have been created. The following code goes inside the Class definition we saw above:&lt;/p&gt;&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="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;Overrides&lt;/span&gt; &lt;span style="color:blue;"&gt;Sub&lt;/span&gt; ExecuteTask()&lt;br /&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;&amp;#39; QueryAttributesTask creates its results&lt;/span&gt;&lt;br /&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;MyBase&lt;/span&gt;.ExecuteTask()&lt;br /&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;&amp;#39; We&amp;#39;ll modify the Results next&lt;/span&gt;&lt;br /&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;Sub&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;Once the parent class has run its ExecuteTask, we can modify the results. The results are stored in a task property object called &lt;strong&gt;Results&lt;/strong&gt; (makes sense, eh?). If the query finds features, those get stored in Results as a standard .NET &lt;em&gt;DataSet&lt;/em&gt;, which contains one or more &lt;em&gt;DataTable&lt;strong&gt; &lt;/strong&gt;&lt;/em&gt;objects. But if nothing was found, the Results contains a different type, a SimpleTaskResult. Also, if the map service isn&amp;rsquo;t working right, the results might have a DataSet, but the name (caption) just has an error message. Let&amp;rsquo;s make sure we have valid results:&lt;/p&gt;&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="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;&amp;#39; We&amp;#39;ll modify the Results next&lt;/span&gt;&lt;/span&gt;&lt;span style="color:green;font-family:'Courier New';"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="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;&amp;#39; Make sure features were found&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="color:blue;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; &lt;span style="color:blue;"&gt;TypeOf&lt;/span&gt; Results &lt;span style="color:blue;"&gt;Is&lt;/span&gt; DataSet &lt;span style="color:blue;"&gt;Then&lt;/span&gt; &lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="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; resultsDS &lt;span style="color:blue;"&gt;As&lt;/span&gt; DataSet = &lt;span style="color:blue;"&gt;CType&lt;/span&gt;(Results, DataSet)&lt;br /&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:green;"&gt;&amp;#39; Check for errors during query&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="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; resultsDS.DataSetName.IndexOf(&lt;span style="color:#a31515;"&gt;&amp;quot;Error&amp;quot;&lt;/span&gt;) &amp;gt; 0 &lt;span&gt;Then&lt;br /&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&gt;Return&lt;br /&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"&gt;&lt;span style="font-family:'Courier New';"&gt;&amp;nbsp;&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;#39; Next we can get the table of results&lt;br /&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"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;Now we can get the table from the DataSet. With the QueryAttributesTask, only one DataTable will be in the DataSet (other tasks may have multiple tables). One more error check: after the task performs its query using the Web ADF common API, it converts the data table to a GraphicsLayer object, so that it contains rendering (symbology) information. If it had any problems making that conversion, then features can&amp;rsquo;t be selected on the map.&lt;/p&gt;&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="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;#39; Next we can get the table of results&lt;br /&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;#39; Get the one table in the QueryAttributesTask result&lt;br /&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; resultsTable &lt;span style="color:blue;"&gt;As&lt;/span&gt; DataTable = resultsDS.Tables(0)&lt;br /&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="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;#39; Make sure no problems creating a GraphicsLayer from the results&lt;br /&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; resultsTable &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;OrElse&lt;/span&gt; &lt;span style="color:blue;"&gt;Not&lt;/span&gt; &lt;span style="color:blue;"&gt;TypeOf&lt;/span&gt; resultsTable &lt;span style="color:blue;"&gt;Is&lt;/span&gt; GraphicsLayer &lt;span style="color:blue;"&gt;Then&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="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;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="color:blue;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;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="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; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color:green;"&gt;&amp;#39; Now we can modify the table results&lt;/span&gt;&lt;span style="color:blue;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;Now we can actually set the selection for the features found! The GraphicsLayer, which extends the DataTable type, will have a Boolean-type column indicating whether the row (map feature) is selected. We can get this column, and use it when looping through the features to set all features as selected:&lt;/p&gt;&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="color:blue;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;#39; Now we can modify the table results&lt;br /&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; graphicsLayer &lt;span style="color:blue;"&gt;As&lt;/span&gt; GraphicsLayer = _&lt;br /&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; &lt;/span&gt;CType&lt;/span&gt;&lt;span style="font-family:'Courier New';"&gt;(resultsTable, GraphicsLayer)&lt;br /&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="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;#39; Get the column that holds the selection attribute&lt;br /&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; selectedCol &lt;span style="color:blue;"&gt;As&lt;/span&gt; DataColumn = graphicsLayer.IsSelectedColumn&lt;br /&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="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;#39; Set each feature to selected&lt;br /&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;For&lt;/span&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;br /&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;row(selectedCol) = &lt;span style="color:blue;"&gt;True&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="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;Next&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;That&amp;rsquo;s it! Now each feature will be selected in the TaskResults tree and also on the map&amp;hellip;.that is, once our task is inside a website, which we&amp;rsquo;ll show shortly.&lt;/p&gt;&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;We compile the code by choosing Build&amp;mdash;Build Solution from the menu (no errors, of course!). This puts a compiled .dll file into the Bin directory of the project (you can see that by looking at the project folder with Windows Explorer).&lt;/p&gt;&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;&lt;h2&gt;Adding the task to Visual Studio&lt;/h2&gt;&lt;p class="MsoNormal"&gt;The easiest way to add the task to a website is when it&amp;rsquo;s in the Visual Studio toolbox. It can be added manually to an individual website, but requires more editing of the source of the page. Let&amp;rsquo;s get the task into Visual Studio. There&amp;rsquo;s more on this in the Developer Help for ArcGIS Server and ArcIMS, so we&amp;rsquo;ll go over this quickly.&lt;/p&gt;&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;First, in the code for the task itself, we add some information so Visual Studio sets properties for task when we drag it onto the page from the toolbox. This goes just above the class declaration:&lt;/p&gt;&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-family:'Courier New';"&gt;&amp;lt;ToolboxData(&lt;span style="color:#a31515;"&gt;&amp;quot;&amp;lt;{0}:QuerySelectTaskVB runat=&amp;quot;&amp;quot;server&amp;quot;&amp;quot; Width=&amp;quot;&amp;quot;200px&amp;quot;&amp;quot; Transparency=&amp;quot;&amp;quot;35&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt; _&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="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:#a31515;"&gt;&amp;quot;BackColor=&amp;quot;&amp;quot;White&amp;quot;&amp;quot; TitleBarColor=&amp;quot;&amp;quot;WhiteSmoke&amp;quot;&amp;quot; TitleBarSeparatorLine=&amp;quot;&amp;quot;False&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt; _&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="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:#a31515;"&gt;&amp;quot;TitleBarHeight=&amp;quot;&amp;quot;20px&amp;quot;&amp;quot; BorderColor=&amp;quot;&amp;quot;LightSteelBlue&amp;quot;&amp;quot; BorderStyle=''Outset'''&lt;/span&gt; _&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="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&gt;&amp;nbsp;&lt;/span&gt;+ &lt;span style="color:#a31515;"&gt;&amp;quot;BorderWidth=&amp;quot;&amp;quot;1px&amp;quot;&amp;quot; Font-Names=&amp;quot;&amp;quot;Verdana&amp;quot;&amp;quot; Font-Size=&amp;quot;&amp;quot;8pt&amp;quot;&amp;quot; ForeColor=&amp;quot;&amp;quot;Black&amp;quot;&amp;quot;&amp;gt;&amp;quot; _&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="color:#a31515;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;+ &amp;quot;&amp;lt;/{0}: QuerySelectTaskVB &amp;gt;&amp;quot;&lt;/span&gt;&lt;span style="font-family:'Courier New';"&gt;)&amp;gt; _&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="color:blue;font-family:'Courier New';"&gt;Public&lt;/span&gt;&lt;span style="font-family:'Courier New';"&gt; &lt;span style="color:blue;"&gt;Class&lt;/span&gt; QuerySelectTaskVB&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;Inherits&lt;/span&gt; QueryAttributesTask&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;Next we will add the task to .NET&amp;rsquo;s Global Assembly Cache. This makes it easier to add the task to various websites. Before we can do this, we must create a strong name to sign the task. We open the .NET command prompt and type:&lt;/p&gt;&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-family:'Courier New';"&gt;sn &amp;ndash;k QuerySelectVB.snk&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;This creates a key file (QuerySelectVB.snk) in the folder indicated by the command prompt (probably C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0). I moved that file using Windows Explorer to the project directory where my task .vb file is located. I then added that to my project by right-clicking on the project in Visual Studio&amp;rsquo;s Solution Explorer, choosing Add-Existing Item, changing the type to All Files, and clicking on the .snk file. I used the keypair to sign the assembly by right-clicking on the project and choosing Properties. In the Properties page, I clicked the Signing tab. I checked the box &lt;strong&gt;Sign the assembly&lt;/strong&gt; and clicked my .snk file in the drop-down list. Finally, I recompiled the code (Build-Build Solution).&lt;/p&gt;&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;Now we can add the task to the Global Assembly Cache. Here&amp;rsquo;s the easy way: I opened two Windows Explorer windows, one to my project folder&amp;rsquo;s bin directory where the .dll is located, the other to C:\Windows\Assembly. I dragged the QuerySelectTaskVB.dll into the C:\Windows\Assembly window. This doesn&amp;rsquo;t actually move the file. It just registers the assembly so it&amp;rsquo;s available to all applications on the system.&lt;/p&gt;&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;Finally let&amp;rsquo;s add the task to Visual Studio. Open Visual Studio and then any .aspx page (you can create a website and page if necessary). Open the toolbox if necessary. Right-click where you want to add the task and click Choose Items (you can also create a new tab with New Tab).&lt;span&gt;&amp;nbsp; &lt;/span&gt;In the Choose Toolbox Items dialog, click Browse, and navigate to your DLL&amp;rsquo;s location. Highlight it and click Open. This adds the task to the list of available assemblies. Make sure its check box is checked, and click OK. This adds the task to the Visual Studio toolbox.&lt;/p&gt;&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;Now the task is available whenever you design an ASP.NET web page. Notice it has an icon&amp;mdash;the same one as the QueryAttributesTask. It inherits this along with other properties of the parent task.&lt;/p&gt;&lt;h2&gt;Using the custom task in a website&lt;/h2&gt;&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;We can use the task in any website. I created a new website using the Web Mapping Application template. I could have added this website to the same solution as my task code if I&amp;rsquo;m using Visual Studio (useful for debugging the task), or in a new instance of Visual Studio. I could also open a website created with ArcGIS Server Manager or ArcIMS Web Manager, and add the task to it. &lt;/p&gt;&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;Once we have our web page open in Visual Studio, we can drag our new task from the toolbox into the Task Manager. Once it&amp;rsquo;s there, we can click its &amp;ldquo;smart tag&amp;rdquo; in its upper right to set the task&amp;rsquo;s properties.&lt;/p&gt;&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;img border="1" height="75" src="http://serverx.esri.com/blogimages/Feb-12-2007/taskManagerProp.PNG" width="200" /&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;Yet another great thing about extending an existing task: we get its designer tools with no coding required. We can set the Task Results container and use &lt;strong&gt;Edit the Query&lt;/strong&gt; to create the query, exactly the same as with the standard QueryAttributesTask (see the Developer Help for tips on that).&lt;/p&gt;&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;The demo site for this page uses this custom task to query a water-well point layer for estimated yield. Choose a value from the drop-down list, and up to 50 features will be found. Notice that all features are immediately highlighted. Our custom task acts like the standard QueryAttributesTask, except that it highlights all features returned.&lt;/p&gt;&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;Try it out: &lt;a href="http://serverx.esri.com/QuerySelectTaskDemo/"&gt;http://serverx.esri.com/QuerySelectTaskDemo/&lt;/a&gt;. &lt;/p&gt;&lt;h2&gt;Discussion&lt;/h2&gt;&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;You can do other interesting things with the Results of the task. For instance, you could add a hyperlink to the task results output by adding the &amp;lt;a href&amp;hellip;&amp;gt; tag to the DataSet&amp;rsquo;s DataSetName property, or to the DataTable.TableName. The hyperlink is displayed in the tree of the task results. You can also modify the DataTable itself, such as by hiding columns you don&amp;rsquo;t want displayed. Another example would be to display the results as a table, by creating a GridView from the DataTable and getting the HTML output from the GridView. You&amp;rsquo;d then create a new TaskResultsNode, add the output to that, and set it as the Results instead of the DataSet.&lt;/p&gt;&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;You might be tempted to customize other aspects of tasks, such as modifying the task&amp;rsquo;s user interface. Although some customizations are possible, you&amp;rsquo;ll probably find that in many cases it would be easier to author your own task from scratch. The Developer Help has a good discussion of writing tasks, and the Web ADF has a couple of samples that can help get you started.&lt;/p&gt;&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;You might have noticed that the task user interface does not have the look-and-feel of other tasks&amp;mdash;the colors, fonts, etc. The standard tasks have properties defined in the Theme of the website, specifically in the Default.skin file. If you want the same look-and-feel of the standard tasks, you can create your own control skin by copying properties from one of the standard tasks in Default.skin.&lt;/p&gt;&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;We haven&amp;rsquo;t discussed how to make our custom task available within Manager, so that non-programmers could use your task. This is a much more complex chore than adding the task to Visual Studio. Tasks are configured in Manager using a separate class called a web configurator. The standard task&amp;rsquo;s web configurators are hard-coded to output information specifically for that task. It is not possible to easily modify them to instead output tags and properties for tasks that extend them. It would be necessary to rewrite most or all of the web configurator in order for it to properly output your task from Manager. The Developer Help has information on writing web configurators, if you are ambitious.&lt;/p&gt;&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;Download the code for this sample: &lt;/p&gt;&lt;p class="MsoNormal" style="margin-left:0.5in;text-indent:-0.25in;"&gt;&amp;lt;!--[if !supportLists]--&amp;gt;&lt;span&gt;-&lt;span style="font:7pt 'Times New Roman';font-size-adjust:none;font-stretch:normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&amp;lt;!--[endif]--&amp;gt;&lt;a href="http://serverx.esri.com/blogimages/Feb-12-2007/QuerySelectTaskVB.zip"&gt;QuerySelectTaskVB.zip&lt;/a&gt; (VB source code)&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left:0.5in;text-indent:-0.25in;"&gt;&amp;lt;!--[if !supportLists]--&amp;gt;&lt;span&gt;-&lt;span style="font:7pt 'Times New Roman';font-size-adjust:none;font-stretch:normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&amp;lt;!--[endif]--&amp;gt;&lt;a href="http://serverx.esri.com/blogimages/Feb-12-2007/QuerySelectTaskCS.zip"&gt;QuerySelectTaskCS.zip&lt;/a&gt; (C# source code)&lt;/p&gt;&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&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=94" width="1" height="1"&gt;</description><category domain="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/ADF/default.aspx">ADF</category><category domain="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/.NET/default.aspx">.NET</category><category domain="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/Code+Snippet/default.aspx">Code Snippet</category><category domain="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/Tasks/default.aspx">Tasks</category></item><item><title>ArcGIS Server for the Microsoft .Net Framework 9.2 Service Pack 1</title><link>http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/2007/01/31/ArcGIS-Server-for-the-Microsoft-.Net-Framework-9.2-Service-Pack-1.aspx</link><pubDate>Wed, 31 Jan 2007 16:50:00 GMT</pubDate><guid isPermaLink="false">b60b3f0a-e2bd-4be5-8a18-822c697649ab:85</guid><dc:creator>Jeremy</dc:creator><slash:comments>4</slash:comments><comments>http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/comments/85.aspx</comments><wfw:commentRss>http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/commentrss.aspx?PostID=85</wfw:commentRss><description>Anne Reuland of the Server Development team has contributed the following excellent detailed writeup on what is in service pack 1 for ArcGIS Server for the Microsoft .Net Framework 9.2.

&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;There&amp;rsquo;s a very good overview of
what&amp;rsquo;s new in ArcGIS Server 9.2 on the &lt;a href="http://support.esri.com/index.cfm?fa=knowledgebase.documentation.listDocs&amp;amp;PID=66"&gt;ArcGIS
Server Product Documentation&lt;/a&gt; page. Open the &lt;/span&gt;&lt;span style="font-size:9.5pt;font-family:Arial;color:black;"&gt;&lt;a href="http://support.esri.com/index.cfm?fa=knowledgebase.documentation.viewDoc&amp;amp;PID=66&amp;amp;MetaID=1203"&gt;Whats
New In ArcGIS Desktop 9.2&lt;/a&gt; document; you&amp;rsquo;ll need to enter your ESRI global
account. The Table of Contents has a listing for ArcGIS Server and ArcIMS. &lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:9.5pt;font-family:Arial;color:black;"&gt;I&amp;rsquo;ve had several folks
ask for an overview on what&amp;rsquo;s included in our Service Pack 1 release. &lt;/span&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;The main purpose of the ArcGIS
Server for the Microsoft .Net Framework 9.2 Service Pack 1 release was to
address support issues with Internet Explorer 7. The problems we saw with ArcGIS
Server 9.2 Final and Internet Explorer 7 were display problems with the map or
Web Mapping Application related to certain tools and changes to the application
layout. We also found formatting problems with buttons and panels in the Web
Mapping Application, Manager, and several samples in our Software Developer Kit.
Here is the full list of bug fixes for Internet Explorer 7 support:&lt;/span&gt;&lt;/p&gt;

&lt;ul&gt;&lt;li class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;NIM005055 - Samples: In IE7, HTML buttons without a
     defined width will span the width of the browser. &lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;NIM005056 - Samples: In IE7, resizable divs should not
     define a width or height. &lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;NIM005539 - When using the Web Mapping Application in
     Internet Explorer 7, clicking the FullExtent or Magnifier tool causes the
     page to go blank. &lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;NIM005540 - When using the Web Mapping Application in
     Internet Explorer 7, docking a floating panel causes the page to go blank.
     &lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;NIM005564 - When running Manager in an Internet
     Explorer 7 browser, the Apply button on the Preview Layers tab may be
     partially obscured or missing completely. &lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;NIM005565 - When running Manager in an Internet
     Explorer 7 browser, the &amp;#39;Preview Map Service&amp;#39; panel is excessively wide. &lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;NIM005566 - When running Manager in an Internet
     Explorer 7 browser and configuring a task, the message informing the user
     that a supporting service is required does not display. &lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;NIM005567 - When running Manager in an Internet
     Explorer 7 browser and editing an existing application, the Configure
     button on the Tasks panel is partially obscured. &lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;NIM005569 - After digitizing a new feature with the
     Geoprocessing Task in Internet Explorer 7, the Help button, Submit button
     and selection of features will not work until clicked twice. &lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;NIM005602 - Visual Studio 2005 SDK help system
     displays&amp;nbsp;with incorrect style and formatting when viewed on a machine
     with Internet Explorer 7 installed. &lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;Once you install Service Pack 1,
newly created web applications will take advantage of these fixes for Internet
Explorer 7. If you have already built applications with Manager or the Web
Mapping Application template that you would like to update with these fixes, we
have written a migration utility that will make these changes to your Web
Mapping applications. You can download the &lt;a href="http://support.esri.com/index.cfm?fa=downloads.samplesUtilities.viewSample&amp;amp;PID=74&amp;amp;MetaID=1240"&gt;migration
utility&lt;/a&gt; from our support site. &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;We&amp;rsquo;re always looking to improve
performance for the web applications and web services. Jeremy has already
posted about the changes to with map cache image formats to support JGP, PNG8,
and PNG32. These changes allow you to choose the image format that works best
for your application&amp;rsquo;s functionality and performance needs.&lt;span&gt;&amp;nbsp; &lt;/span&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:Arial;"&gt;Other performance improvements made
at Service Pack 1 affect web service authentication and geocoding with ArcWeb
Services. In the Web Mapping Application, we made improvements on how fast the
map and task results are initialized. These bug fixes are:&lt;/span&gt;&lt;/p&gt;

&lt;ul&gt;&lt;li class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;NIM005590 - Improve&amp;nbsp;Web services authentication
     performance. &lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;NIM005598 - Optimize the display of task results when
     using ArcGIS Server Internet resources. &lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;NIM005623 - Optimize initialization within the Map
     control&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;NIM005619 - Optimize geocoding with ArcWeb Services
     resources. &lt;span&gt;&amp;nbsp;&lt;/span&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;When using caches map services, if
you have secured both your map service and the cache directories that hold your
map tiles, Service Pack 1 includes a fix to allow the Web Mapping Application
to access those secured tile directories without prompting the end-user of the
application for a username and password. Once a username and password has been
specified during creation of the Web Mapping Application, that account will be
used to access the secured map service and the secured tile directories. The
bug fix for this change is: &lt;/span&gt;&lt;/p&gt;

&lt;ul&gt;&lt;li class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;NIM005541 - Use the Identity information provided when
     defining a map resource to access cache directories&amp;nbsp;that&amp;nbsp;have
     been secured. &lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;If you are using ArcWeb Services in
your Web Mapping Application, you may have been affected by this bug fixed at
Service Pack 1:&lt;/span&gt;&lt;/p&gt;

&lt;ul&gt;&lt;li class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;NIM005593 - ArcWeb services randomly return the error
     &amp;#39;The underlying connection was closed: A connection that was expected to
     be kept alive was closed by the server&amp;#39;. &lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;We also fixed problems with some of
the query operators for the Query Attributes task at Service Pack 1. :&lt;/span&gt;&lt;/p&gt;

&lt;ul&gt;&lt;li class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;NIM005323 - Web applications containing a Query Task
     expression using either the &amp;lt; or &amp;lt;= operators will fail to build. &lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;NIM005571 - Web applications published from Manager
     containing a Query Task expression using the LIKE operator do not return
     the correct results. &lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;NIM005572 - Web applications containing a Query Task
     expression using the != operator do not return the correct results. &lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;In the Web Mapping Application,
after running a task to get a list of results, the Zoom To option for point
features was not zooming in far enough. This problem was addressed at Service
Pack 1 by adding a property named ZoomToPointFactor to the Task Results control
to allow you to control the zooming:&lt;/span&gt;&lt;/p&gt;

&lt;ul&gt;&lt;li class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;NIM005594 - Add a ZoomToPointFactor property to the
     TaskResults control to specify the scale change when using the ZoomTo
     context menu option. &lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;Also in the Web Mapping Application,
fixes were made to ensure the scale bar displays in the expected location:&lt;/span&gt;&lt;/p&gt;

&lt;ul&gt;&lt;li class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;NIM005622 &amp;ndash; Fix cases where the Scalebar is displayed
     outside the&amp;nbsp;Map control on initial startup of the Web Mapping
     Application. &lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:9.5pt;font-family:Arial;color:black;"&gt;You can get the full list
of &lt;a href="http://support.esri.com/index.cfm?fa=downloads.patchesServicePacks.viewPatch&amp;amp;PID=66&amp;amp;MetaID=1224#issues"&gt;issues&lt;/a&gt;
that were addressed on the Service Pack page.&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:Arial;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;img src="http://serverx.esri.com/ESRIBlogs/aggbug.aspx?PostID=85" width="1" height="1"&gt;</description><category domain="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/ArcGIS/default.aspx">ArcGIS</category><category domain="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/.NET/default.aspx">.NET</category><category domain="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/92+SP1/default.aspx">92 SP1</category></item><item><title>ArcGIS Server Code Challenge</title><link>http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/2007/01/24/ArcGIS-Server-Code-Challenge.aspx</link><pubDate>Wed, 24 Jan 2007 18:45:00 GMT</pubDate><guid isPermaLink="false">b60b3f0a-e2bd-4be5-8a18-822c697649ab:80</guid><dc:creator>Jeremy</dc:creator><slash:comments>0</slash:comments><comments>http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/comments/80.aspx</comments><wfw:commentRss>http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/commentrss.aspx?PostID=80</wfw:commentRss><description>&lt;p&gt;Hey everyone.&amp;nbsp; I hope to see you in Palm Springs at the &lt;a href="http://www.esri.com/events/devsummit/index.html" target="_blank"&gt;2007 ESRI Developer&amp;#39;s Summit&lt;/a&gt;. &lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;If you have not heard already, there is going to be an ArcGIS Server Code Challenge.&amp;nbsp; Give it a shot and let us know if you have any questions. &lt;br /&gt;
&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;span style="font-size:10pt;"&gt;Share your development creativity and expertise 
with the GIS developer community by submitting your original code sample to the 
ArcGIS Server Code Challenge!&amp;nbsp; &lt;/span&gt;&lt;/em&gt;&lt;span style="font-size:10pt;"&gt;&lt;em&gt;You and your peers will have an opportunity to 
review and vote for the top three entries based on originality, creativity, 
applicability, and relevance of the code sample. Entries could include a simple 
task or tool or an attribute or spatial query.&amp;nbsp; &lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:10pt;"&gt;Read more on the &lt;a href="http://www.esri.com/events/devsummit/events/dev_challenge.html" title="code challenge" target="_blank"&gt;ArcGIS Server Code Challenge&lt;/a&gt;.&amp;nbsp; &lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Jeremy&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://serverx.esri.com/ESRIBlogs/aggbug.aspx?PostID=80" width="1" height="1"&gt;</description><category domain="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/ArcGIS/default.aspx">ArcGIS</category><category domain="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/Developer+Summit/default.aspx">Developer Summit</category></item><item><title>Antialiasing with multiple cached resources</title><link>http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/2007/01/19/Antialiasing-with-multiple-cached-resources.aspx</link><pubDate>Fri, 19 Jan 2007 21:03:00 GMT</pubDate><guid isPermaLink="false">b60b3f0a-e2bd-4be5-8a18-822c697649ab:77</guid><dc:creator>Jeremy</dc:creator><slash:comments>4</slash:comments><comments>http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/comments/77.aspx</comments><wfw:commentRss>http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/commentrss.aspx?PostID=77</wfw:commentRss><description>&lt;p&gt;Combining multiple cached map services is one of the more powerful aspects of the ADF for ArcGIS Server.&amp;nbsp; High performance mapping applications can be built off of multiple fused cached map services combined within the ADF.&amp;nbsp; Lets build on the cached aerial photography &lt;a href="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/2007/01/03/ArcGIS-Server-Service-Pack-1.aspx" target="_blank"&gt;example&lt;/a&gt; from the other day and add a cached dataset of a street network.&amp;nbsp; In order to get the best performance when combining cached datasets in the Web ADF for the Microsoft .NET Framework you need to ensure that your cache configurations are identical (same scales, projection, tile size, etc) and that the map services share similar dataframe extents.&amp;nbsp; When building a map cache you have the option of taking advantage of &lt;a href="http://en.wikipedia.org/wiki/Anti-aliasing" target="_blank"&gt;Antialiasing&lt;/a&gt; to smooth the edges of labels and lines for improved display quality).&amp;nbsp; Of course you want to have smooth lines and labels!&amp;nbsp; So what does antialiasing really do?&amp;nbsp; Let&amp;#39;s look at some comparisons of similar tiles with and without antialiasing.&lt;/p&gt;
&lt;p&gt;&lt;img alt="No Antialiasing" border="1" height="256" src="http://serverx.esri.com/arcgiscache/DG_County_roads_noa/Layers/_alllayers/L02/R00000a3c/C000009c8.png" title="No Antialiasing" width="256" /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;img alt="Yes Antialiasing" border="1" height="256" src="http://serverx.esri.com/arcgiscache/DG_County_roads_yesA_backgroundwhite/Layers/_alllayers/L02/R00000a3c/C000009c8.png" title="Yes Antialiasing" width="256" /&gt;&lt;/p&gt;
&lt;p&gt;The image on the left is without antialiasing enabled.&amp;nbsp; The image to the right has been built using antialiasing.&amp;nbsp; See the difference?&amp;nbsp; The image with antialiasing of the &lt;a href="http://www.kansasgis.org/catalog/catalog.cfm" target="_blank"&gt;2000 Census Roadways&lt;/a&gt; dataset looks crisper, not as choppy.&amp;nbsp;&amp;nbsp; Antialiasing is designed to minimize jagged, blocky aliasing when representing higher resolution data at a lower resolution.&amp;nbsp; So let&amp;#39;s see what happens when we publish the data on top of our ortho cache...&lt;/p&gt;
&lt;p&gt;&lt;img align="middle" alt="Cache combination with AntiAliasing" border="1" height="274" src="http://serverx.esri.com/blogimages/jan-18-2007/cachewithantialiasing.png" title="Cache combination with AntiAliasing" width="277" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Wait a minute...where did my roads go?&amp;nbsp; Let&amp;#39;s look at the same area without antialiasing...&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;img alt="Cache combination without antialiasing." border="1" height="273" src="http://serverx.esri.com/blogimages/jan-18-2007/cachewithoutantialiasing.png" title="Cache combination without antialiasing." width="251" /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;That is what I get for implementing something without understanding the logic behind the process!&amp;nbsp; The way we have implemented antialiasing from ArcGIS server is to generate tiles four times as large as the specified tile size so that we can average the RGB color of the four pixels that intersect the feature or label.&amp;nbsp;&amp;nbsp; So instead of a tiled pixel being completely black or not, it will be an average of the subpixels contained by the pixel.&amp;nbsp; What does it average if it is just a line that is either black or not black?&amp;nbsp; It uses the background color of the dataframe to compute the average pixel value.&amp;nbsp; The background color is used as the transparent color by cache generation process and if you don&amp;#39;t set the background color of your map the default is to set the background equal to 253,253,253 or almost white.&amp;nbsp; So in my example I have ended up with gray roads (which don&amp;#39;t show up well on a dark image) instead of what I originally designed as black roads.&amp;nbsp; If I rebuild my map cache of my road dataset with a background color set to an average color within the image of the ortho tile (RGB: 129,129,116--pulled from &lt;a href="http://www.sharewareconnection.com/download-colorpickup-from-sharecon.html" target="_blank"&gt;this&lt;/a&gt; slick freeware tool) I end up with a tile that looks like this...&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;img border="1" height="256" src="http://serverx.esri.com/arcgiscache/DG_County_roads_yesA_backgroundDark/Layers/_alllayers/L02/R00000a3c/C000009c8.png" width="256" /&gt;&amp;nbsp; &lt;img border="1" height="306" src="http://serverx.esri.com/blogimages/jan-18-2007/cachewithantialiasing_darkbackground.png" width="294" /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Try the application with each of the antialiasing options here: &amp;nbsp; &lt;a href="http://serverx.esri.com/antialiasingexamples/" target="_blank"&gt;http://serverx.esri.com/antialiasingexamples/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Jeremy&amp;nbsp;&lt;/p&gt;&lt;img src="http://serverx.esri.com/ESRIBlogs/aggbug.aspx?PostID=77" width="1" height="1"&gt;</description><category domain="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/ArcGIS/default.aspx">ArcGIS</category><category domain="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/ADF/default.aspx">ADF</category><category domain="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/.NET/default.aspx">.NET</category><category domain="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/Map+Cache/default.aspx">Map Cache</category></item><item><title>Embedding globe services within other globes</title><link>http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/2007/01/18/Embedding-globe-services-within-other-globes.aspx</link><pubDate>Thu, 18 Jan 2007 16:54:00 GMT</pubDate><guid isPermaLink="false">b60b3f0a-e2bd-4be5-8a18-822c697649ab:75</guid><dc:creator>Jeremy</dc:creator><slash:comments>0</slash:comments><comments>http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/comments/75.aspx</comments><wfw:commentRss>http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/commentrss.aspx?PostID=75</wfw:commentRss><description>&lt;p&gt;James posted a &lt;a href="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/2006/12/14/Publishing-globe-services-to-enhance-your-ArcGIS-Explorer-base-map.aspx#67" target="_blank"&gt;comment&lt;/a&gt; regarding publishing Globe services with other embedded Globe services.&amp;nbsp; This can be done, but it is not the recommended workflow.&amp;nbsp; Sterling from the Server Dev team wrote up this response.&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;strong&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;As you
create 3D views using ArcGIS Explorer and ArcGlobe, you may want to use a layer
from someone else&amp;rsquo;s globe service in addition to your own. For example, you
might want to get your base layers from an &lt;a href="http://arcgisonline.esri.com" target="_blank"&gt;ArcGIS Online&lt;/a&gt; globe
service, and your thematic layers from your own globe service.&lt;/span&gt;

&lt;p class="MsoNormal"&gt;&lt;strong&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;em&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;Resist the temptation to create a
new globe service that embeds one or more other globe services.&lt;/span&gt;&lt;/em&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt; Your client applications will
perform better and you will avoid redundancy of caches on your server if you have
the clients connect to the globe services directly. The workflow below explains
how you can create an easily-distributable globe that will allow clients to
connect directly to all of the globe services it contains. This example uses an
ArcGIS Online service, but you could substitute any globe service that you
might want to embed in your own globes:&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:Arial;color:black;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;ol style="margin-top:0in;"&gt;
&lt;li class="MsoNormal" style="color:black;"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;Create a new ArcGIS Explorer
     map (NMF) or ArcGlobe document (3DD) and add the ArcGIS Online service&lt;/span&gt;&lt;/li&gt;
&lt;li class="MsoNormal" style="color:black;"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;Add your local data to a
     separate ArcGlobe document and publish it as an ArcGIS Server globe
     service. &lt;/span&gt;&lt;/li&gt;
&lt;li class="MsoNormal" style="color:black;"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;Add your globe service to the
     ArcGIS Explorer map or ArcGlobe document that you created in Step 1.&lt;/span&gt;&lt;/li&gt;
&lt;li class="MsoNormal" style="color:black;"&gt;&lt;span style="font-size:10pt;font-family:Arial;"&gt;Distribute the ArcGIS Explorer
     map or ArcGlobe document. Optionally, you can publish the ArcGlobe
     document as a PMF file so that clients with ArcReader can view the globe.
     Both ArcGIS Explorer and ArcReader are available as free downloads from
     ESRI.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;img border="1" height="270" src="http://serverx.esri.com/blogimages/jan-18-2007/globe_within_globe_small.png" width="568" /&gt;&lt;br /&gt;
&amp;nbsp;&lt;/p&gt;
&lt;p&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=75" width="1" height="1"&gt;</description><category domain="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/ArcGIS/default.aspx">ArcGIS</category><category domain="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/ArcGIS+Explorer/default.aspx">ArcGIS Explorer</category><category domain="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/Globe+Services/default.aspx">Globe Services</category></item><item><title>ArcGIS Server Service Pack 1</title><link>http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/2007/01/03/ArcGIS-Server-Service-Pack-1.aspx</link><pubDate>Thu, 04 Jan 2007 00:47:00 GMT</pubDate><guid isPermaLink="false">b60b3f0a-e2bd-4be5-8a18-822c697649ab:60</guid><dc:creator>Jeremy</dc:creator><slash:comments>10</slash:comments><comments>http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/comments/60.aspx</comments><wfw:commentRss>http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/commentrss.aspx?PostID=60</wfw:commentRss><description>&lt;p&gt;ArcGIS Server Service Pack 1 is out and available for &lt;a href="http://support.esri.com/index.cfm?fa=downloads.patchesServicePacks.viewPatch&amp;amp;PID=66&amp;amp;MetaID=1224" target="_blank"&gt;download&lt;/a&gt;.&amp;nbsp; It has many fixes along with some very key enhancements.&amp;nbsp; One of the biggest enhancements is the ability to create map caches in different image type formats.&amp;nbsp; At 9.2 final you only had the option of creating PNG24 images for you map cache.&amp;nbsp; While PNG24 images are visually appealing and work well with images with a lot of vector data they are inefficient for continuous raster images like aerial photography or satellite imagery.&amp;nbsp; For example here are two tiles of orthophotography in both png (on the left) and jpeg (on the right):&lt;/p&gt;
&lt;p&gt;&lt;img alt="PNG" border="1" height="256" src="http://serverx.esri.com/arcgiscache/DGCountyAerialPhotos/Layers/_alllayers/L05/R000051f3/C00004e39.png" title="PNG" width="256" /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;img alt="JPEG" border="1" height="256" src="http://serverx.esri.com/arcgiscache/DGCountyAerialPhotos/Layers/_alllayers/L05/R000051f3/C00004e39.jpg" title="JPEG" width="256" /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The JPEG tile is 16.39kb.&amp;nbsp; The PNG tile is 85.93kb.&amp;nbsp; That makes the JPEG in this case 1/5 the size of the PNG.&amp;nbsp; While that does not really make that much difference while you are on an internal network, it makes a big difference for web applications.&amp;nbsp; It is important to note that JPEGs do not support transparency so PNG images would be ideal for map caches that need to be transparent (a roads cache on top of an ortho cache for example).&amp;nbsp; &lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;Try out a demo here:&amp;nbsp; &lt;a href="http://serverx.esri.com/dgaerialsws" target="_blank"&gt;http://serverx.esri.com/dgaerialsws&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This example uses 2 meter &lt;a href="http://www.kansasgis.org/catalog/catalog.cfm" target="_blank"&gt;FSA NAIP&lt;/a&gt;
color imagery and six inch black and white orthophotos courtesy of the &lt;a href="http://www.lawrenceks.org/infosystems/gis2.shtml" target="_blank"&gt;City of Lawrence, Kansas&lt;/a&gt;.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;Jeremy&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://serverx.esri.com/dgaerials" target="_blank"&gt;&lt;/a&gt;&lt;br /&gt;
&amp;nbsp;&lt;/p&gt;&lt;img src="http://serverx.esri.com/ESRIBlogs/aggbug.aspx?PostID=60" width="1" height="1"&gt;</description><category domain="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/ArcGIS/default.aspx">ArcGIS</category><category domain="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/ADF/default.aspx">ADF</category><category domain="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/.NET/default.aspx">.NET</category><category domain="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/Map+Cache/default.aspx">Map Cache</category></item><item><title>Using the Callback control framework with a map resource</title><link>http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/2006/12/18/Using-the-Callback-control-framework-with-a-map-resource.aspx</link><pubDate>Mon, 18 Dec 2006 23:51:00 GMT</pubDate><guid isPermaLink="false">b60b3f0a-e2bd-4be5-8a18-822c697649ab:46</guid><dc:creator>Jeremy</dc:creator><slash:comments>5</slash:comments><comments>http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/comments/46.aspx</comments><wfw:commentRss>http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/commentrss.aspx?PostID=46</wfw:commentRss><description>&lt;p&gt;Let&amp;#39;s build on the &lt;a href="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/2006/12/18/Using-the-Callback-control-framework.aspx" target="_blank"&gt;sample&lt;/a&gt; that Ryan put together and use the callback control framework to refresh a map control.&amp;nbsp; In this case we need to send back callback results of the map control to the control being called back to (the callback button).&amp;nbsp; To illustrate this lets add a map, map control, and a couple of Callback Button controls to the map design time in Microsoft&amp;#39;s Visual Studio 2005.&amp;nbsp; We want to give the user the ability to add and remove a dynamic dataset via the CallbackButtonCustomControl. &lt;br /&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;To do this we need a method that adds a dynamic resource to the MapResourceManagerInstance.&lt;br /&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:blue;"&gt;private&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt; &lt;span style="color:blue;"&gt;void&lt;/span&gt; createAndAddResource(&lt;span style="color:blue;"&gt;string&lt;/span&gt;
resourceName, &lt;span style="color:teal;"&gt;GISResourceItemDefinition&lt;/span&gt;
definition, &lt;span style="color:blue;"&gt;bool&lt;/span&gt; insertIntoBeginning)&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&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:teal;"&gt;MapResourceItem&lt;/span&gt;
resourceItem = &lt;span style="color:blue;"&gt;new&lt;/span&gt; &lt;span style="color:teal;"&gt;MapResourceItem&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;resourceItem.Definition = definition;&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;resourceItem.Name = resourceName;&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;resourceItem.DisplaySettings = &lt;span style="color:blue;"&gt;new&lt;/span&gt; ESRI.ArcGIS.ADF.Web.&lt;span style="color:teal;"&gt;DisplaySettings&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;resourceItem.DisplaySettings.Visible = &lt;span style="color:blue;"&gt;true&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;resourceItem.DisplaySettings.Transparency = 20;&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;resourceItem.DisplaySettings.DisplayInTableOfContents
= &lt;span style="color:blue;"&gt;false&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;resourceItem.DisplaySettings.ImageDescriptor.TransparentBackground = &lt;span style="color:blue;"&gt;true&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;resourceItem.DisplaySettings.ImageDescriptor.TransparentColor =
System.Drawing.&lt;span style="color:teal;"&gt;Color&lt;/span&gt;.FromArgb(1, 2, 3);&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;if&lt;/span&gt;
(insertIntoBeginning)&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;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;Map1.MapResourceManagerInstance.ResourceItems.Insert(0, resourceItem);&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;else&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;Map1.MapResourceManagerInstance.ResourceItems.Add(resourceItem);&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;resourceItem.CreateResource();&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;Map1.InitializeFunctionalities();&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&gt;&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Within the CallbackButton1_Clicked event we call the method to create and display the dynamic resource and then use the callback control framework to pass the CallbackResults from the map to the control.&lt;br /&gt;&amp;nbsp;

&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left:0.5in;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';color:blue;"&gt;&amp;nbsp; string&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt; resourceName = &lt;span style="color:maroon;"&gt;&amp;quot;Dynamic Data&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;&lt;span style="color:teal;"&gt;GISResourceItemDefinition&lt;/span&gt;
definition = &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; &lt;/span&gt;definition = &lt;span style="color:blue;"&gt;new&lt;/span&gt;
&lt;span style="color:teal;"&gt;GISResourceItemDefinition&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;definition.ResourceDefinition = &lt;span style="color:maroon;"&gt;&amp;quot;(default)@DGCountyAerialPhotos&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;definition.DataSourceDefinition = &lt;span style="color:maroon;"&gt;&amp;quot;http://localhost/arcgis/services&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;definition.DataSourceType = &lt;span style="color:maroon;"&gt;&amp;quot;ArcGIS Server Internet&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;definition.DataSourceShared = &lt;span style="color:blue;"&gt;true&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; createAndAddResource(resourceName,
definition, &lt;span style="color:blue;"&gt;false&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;&amp;nbsp;&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;if&lt;/span&gt;
(Map1.ImageBlendingMode == &lt;span style="color:teal;"&gt;ImageBlendingMode&lt;/span&gt;.WebTier)&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Map1.Refresh();&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;else&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Map1.RefreshResource(resourceName);&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;CallbackButton1.CallbackResults.CopyFrom(Map1.CallbackResults);&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;So now we can add dynamic data to a map on a callback.&lt;/p&gt;&lt;p&gt;Try the &lt;a href="http://serverx.esri.com/blogimages/DEC-18-2006/CallBackMap.zip"&gt;sample app&lt;/a&gt; out here:&amp;nbsp; &lt;a href="http://serverx.esri.com/callbackbuttonsample/map.aspx" target="_blank"&gt;http://serverx.esri.com/callbackbuttonsample/map.aspx&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Jeremy&amp;nbsp;&lt;/p&gt;&lt;img src="http://serverx.esri.com/ESRIBlogs/aggbug.aspx?PostID=46" width="1" height="1"&gt;</description><category domain="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/ADF/default.aspx">ADF</category><category domain="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/.NET/default.aspx">.NET</category><category domain="http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/tags/Code+Snippet/default.aspx">Code Snippet</category></item></channel></rss>