<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:p="urn:schemas-microsoft-com:office:powerpoint" xmlns:a="urn:schemas-microsoft-com:office:access" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema" xmlns:b="urn:schemas-microsoft-com:office:publisher" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:c="urn:schemas-microsoft-com:office:component:spreadsheet" xmlns:oa="urn:schemas-microsoft-com:office:activation" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns:q="http://schemas.xmlsoap.org/soap/envelope/" xmlns:D="DAV:" xmlns:x2="http://schemas.microsoft.com/office/excel/2003/xml" xmlns:ois="http://schemas.microsoft.com/sharepoint/soap/ois/" xmlns:dir="http://schemas.microsoft.com/sharepoint/soap/directory/" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:dsp="http://schemas.microsoft.com/sharepoint/dsp" xmlns:udc="http://schemas.microsoft.com/data/udc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sps="http://schemas.microsoft.com/sharepoint/soap/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:udcxf="http://schemas.microsoft.com/data/udc/xmlfile" xmlns:wf="http://schemas.microsoft.com/sharepoint/soap/workflow/" xmlns:mver="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns:mrels="http://schemas.openxmlformats.org/package/2006/relationships" xmlns:ex12t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026">
  <o:colormenu v:ext="edit" fillcolor="none [3213]" />
 </o:shapedefaults></xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body bgcolor=black lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal>I have followed the example in the developer&#8217;s guide
(1.2) &#8220;Use the Web API to Set Selection&#8221;. <o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>The code runs without any errors, but something is not
right. &nbsp;The selection is not visible until I manually right-click the map
and select the option &#8216;Refresh Map&#8217;.&nbsp; Also, the status bar of
the map says &#8220;0 features selected&#8221;, and nothing shows up in the
properties pane on the left.<o:p></o:p></p>

<p class=MsoNormal>Even when I manually refresh the map, the parcel then shows
up as being selected but the properties window is blank, and the status bar
still says &#8216;0 features&#8217;<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>Thanks for the help.&nbsp; My code follows:<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>-Mark Pendergraft<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
background:yellow;mso-highlight:yellow'>&lt;%</span><span style='font-family:
"Courier New";color:blue;background:black;mso-highlight:black'>@</span><span
style='font-family:"Courier New";color:white;background:black;mso-highlight:
black'> </span><span style='font-family:"Courier New";color:#A31515;background:
black;mso-highlight:black'>Page</span><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'> </span><span
style='font-family:"Courier New";color:red;background:black;mso-highlight:black'>Language</span><span
style='font-family:"Courier New";color:blue;background:black;mso-highlight:
black'>=&quot;VB&quot;</span><span style='font-family:"Courier New";color:white;
background:black;mso-highlight:black'> </span><span style='font-family:"Courier New";
background:yellow;mso-highlight:yellow'>%&gt;<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
background:yellow;mso-highlight:yellow'>&lt;%</span><span style='font-family:
"Courier New";color:blue;background:black;mso-highlight:black'>@</span><span
style='font-family:"Courier New";color:white;background:black;mso-highlight:
black'> </span><span style='font-family:"Courier New";color:#A31515;background:
black;mso-highlight:black'>Import</span><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'> </span><span
style='font-family:"Courier New";color:red;background:black;mso-highlight:black'>Namespace</span><span
style='font-family:"Courier New";color:blue;background:black;mso-highlight:
black'>=&quot;OSGeo.Mapguide&quot;</span><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'> </span><span
style='font-family:"Courier New";background:yellow;mso-highlight:yellow'>%&gt;<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
background:yellow;mso-highlight:yellow'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:green;background:black;mso-highlight:black'>&lt;!-- #Include
File=&quot;../UtilityFunctions.aspx&quot; --&gt;<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:green;background:black;mso-highlight:black'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:blue;background:black;mso-highlight:black'>&lt;!</span><span
style='font-family:"Courier New";color:#A31515;background:black;mso-highlight:
black'>DOCTYPE</span><span style='font-family:"Courier New";color:white;
background:black;mso-highlight:black'> </span><span style='font-family:"Courier New";
color:red;background:black;mso-highlight:black'>html</span><span
style='font-family:"Courier New";color:white;background:black;mso-highlight:
black'> </span><span style='font-family:"Courier New";color:red;background:
black;mso-highlight:black'>PUBLIC</span><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'> </span><span
style='font-family:"Courier New";color:blue;background:black;mso-highlight:
black'>&quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot;</span><span
style='font-family:"Courier New";color:white;background:black;mso-highlight:
black'> </span><span style='font-family:"Courier New";color:blue;background:
black;mso-highlight:black'>&quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:blue;background:black;mso-highlight:black'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:blue;background:black;mso-highlight:black'>&lt;</span><span
style='font-family:"Courier New";color:#A31515;background:black;mso-highlight:
black'>script</span><span style='font-family:"Courier New";color:white;
background:black;mso-highlight:black'> </span><span style='font-family:"Courier New";
color:red;background:black;mso-highlight:black'>runat</span><span
style='font-family:"Courier New";color:blue;background:black;mso-highlight:
black'>=&quot;server&quot;&gt;<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'>&nbsp;&nbsp;&nbsp; </span><span
style='font-family:"Courier New";color:blue;background:black;mso-highlight:
black'>Private</span><span style='font-family:"Courier New";color:white;
background:black;mso-highlight:black'> selectionXML </span><span
style='font-family:"Courier New";color:blue;background:black;mso-highlight:
black'>as</span><span style='font-family:"Courier New";color:white;background:
black;mso-highlight:black'> </span><span style='font-family:"Courier New";
color:blue;background:black;mso-highlight:black'>string<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'>&nbsp;&nbsp;&nbsp; </span><span
style='font-family:"Courier New";color:blue;background:black;mso-highlight:
black'>Private</span><span style='font-family:"Courier New";color:white;
background:black;mso-highlight:black'> MapDef </span><span style='font-family:
"Courier New";color:blue;background:black;mso-highlight:black'>As</span><span
style='font-family:"Courier New";color:white;background:black;mso-highlight:
black'> </span><span style='font-family:"Courier New";color:blue;background:
black;mso-highlight:black'>String</span><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'> = </span><span
style='font-family:"Courier New";color:#A31515;background:black;mso-highlight:
black'>&quot;Library://Kroll/Map/MGA.MapDefinition&quot;<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:blue;background:black;mso-highlight:black'>&lt;/</span><span
style='font-family:"Courier New";color:#A31515;background:black;mso-highlight:
black'>script</span><span style='font-family:"Courier New";color:blue;
background:black;mso-highlight:black'>&gt;<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:blue;background:black;mso-highlight:black'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:blue;background:black;mso-highlight:black'>&lt;</span><span
style='font-family:"Courier New";color:#A31515;background:black;mso-highlight:
black'>html</span><span style='font-family:"Courier New";color:white;
background:black;mso-highlight:black'> </span><span style='font-family:"Courier New";
color:red;background:black;mso-highlight:black'>xmlns</span><span
style='font-family:"Courier New";color:blue;background:black;mso-highlight:
black'>=&quot;http://www.w3.org/1999/xhtml&quot;</span><span style='font-family:
"Courier New";color:white;background:black;mso-highlight:black'> </span><span
style='font-family:"Courier New";color:blue;background:black;mso-highlight:
black'>&gt;<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:blue;background:black;mso-highlight:black'>&lt;</span><span
style='font-family:"Courier New";color:#A31515;background:black;mso-highlight:
black'>head</span><span style='font-family:"Courier New";color:white;
background:black;mso-highlight:black'> </span><span style='font-family:"Courier New";
color:red;background:black;mso-highlight:black'>runat</span><span
style='font-family:"Courier New";color:blue;background:black;mso-highlight:
black'>=&quot;server&quot;&gt;<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'>&nbsp;&nbsp;&nbsp; </span><span
style='font-family:"Courier New";color:blue;background:black;mso-highlight:
black'>&lt;</span><span style='font-family:"Courier New";color:#A31515;
background:black;mso-highlight:black'>title</span><span style='font-family:
"Courier New";color:blue;background:black;mso-highlight:black'>&gt;</span><span
style='font-family:"Courier New";color:white;background:black;mso-highlight:
black'>Untitled Page</span><span style='font-family:"Courier New";color:blue;
background:black;mso-highlight:black'>&lt;/</span><span style='font-family:
"Courier New";color:#A31515;background:black;mso-highlight:black'>title</span><span
style='font-family:"Courier New";color:blue;background:black;mso-highlight:
black'>&gt;<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:blue;background:black;mso-highlight:black'>&lt;/</span><span
style='font-family:"Courier New";color:#A31515;background:black;mso-highlight:
black'>head</span><span style='font-family:"Courier New";color:blue;background:
black;mso-highlight:black'>&gt;<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:blue;background:black;mso-highlight:black'>&lt;</span><span
style='font-family:"Courier New";color:#A31515;background:black;mso-highlight:
black'>body</span><span style='font-family:"Courier New";color:white;
background:black;mso-highlight:black'> </span><span style='font-family:"Courier New";
color:red;background:black;mso-highlight:black'>class</span><span
style='font-family:"Courier New";color:blue;background:black;mso-highlight:
black'>=&quot;AppFrame&quot;</span><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'> </span><span
style='font-family:"Courier New";color:red;background:black;mso-highlight:black'>onLoad</span><span
style='font-family:"Courier New";color:blue;background:black;mso-highlight:
black'>=&quot;OnPageLoad()&quot;&gt;<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:blue;background:black;mso-highlight:black'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
background:yellow;mso-highlight:yellow'>&lt;%</span><span style='font-family:
"Courier New";color:white;background:black;mso-highlight:black'> <o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'>&nbsp;&nbsp;&nbsp; </span><span
style='font-family:"Courier New";color:blue;background:black;mso-highlight:
black'>Try<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span style='font-family:"Courier New";color:blue;background:black;
mso-highlight:black'>Dim</span><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'> SessionId </span><span
style='font-family:"Courier New";color:blue;background:black;mso-highlight:
black'>As</span><span style='font-family:"Courier New";color:white;background:
black;mso-highlight:black'> </span><span style='font-family:"Courier New";
color:blue;background:black;mso-highlight:black'>String</span><span
style='font-family:"Courier New";color:white;background:black;mso-highlight:
black'> = GetRequestParameters(</span><span style='font-family:"Courier New";
color:#A31515;background:black;mso-highlight:black'>&quot;SESSION&quot;</span><span
style='font-family:"Courier New";color:white;background:black;mso-highlight:
black'>)<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
InitializeWebTier()<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span style='font-family:"Courier New";color:blue;background:black;
mso-highlight:black'>Dim</span><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'> UserInfo </span><span
style='font-family:"Courier New";color:blue;background:black;mso-highlight:
black'>As</span><span style='font-family:"Courier New";color:white;background:
black;mso-highlight:black'> </span><span style='font-family:"Courier New";
color:blue;background:black;mso-highlight:black'>New</span><span
style='font-family:"Courier New";color:white;background:black;mso-highlight:
black'> MgUserInformation(SessionId)<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span style='font-family:"Courier New";color:blue;background:black;
mso-highlight:black'>Dim</span><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'> site </span><span
style='font-family:"Courier New";color:blue;background:black;mso-highlight:
black'>As</span><span style='font-family:"Courier New";color:white;background:
black;mso-highlight:black'> </span><span style='font-family:"Courier New";
color:blue;background:black;mso-highlight:black'>New</span><span
style='font-family:"Courier New";color:white;background:black;mso-highlight:
black'> MgSite()<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
site.Open(UserInfo)<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span style='font-family:"Courier New";color:blue;background:black;
mso-highlight:black'>Dim</span><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'> siteconnection </span><span
style='font-family:"Courier New";color:blue;background:black;mso-highlight:
black'>As</span><span style='font-family:"Courier New";color:white;background:
black;mso-highlight:black'> </span><span style='font-family:"Courier New";
color:blue;background:black;mso-highlight:black'>New</span><span
style='font-family:"Courier New";color:white;background:black;mso-highlight:
black'> MgSiteConnection<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
siteconnection.Open(UserInfo)<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span style='font-family:"Courier New";color:blue;background:black;
mso-highlight:black'>dim</span><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'> ResourceService </span><span
style='font-family:"Courier New";color:blue;background:black;mso-highlight:
black'>as</span><span style='font-family:"Courier New";color:white;background:
black;mso-highlight:black'> mgresourceservice =
siteconnection.CreateService(MgServiceType.ResourceService)<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span style='font-family:"Courier New";color:blue;background:black;
mso-highlight:black'>Dim</span><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'> MapDefId </span><span
style='font-family:"Courier New";color:blue;background:black;mso-highlight:
black'>As</span><span style='font-family:"Courier New";color:white;background:
black;mso-highlight:black'> </span><span style='font-family:"Courier New";
color:blue;background:black;mso-highlight:black'>New</span><span
style='font-family:"Courier New";color:white;background:black;mso-highlight:
black'> MgResourceIdentifier(MapDef)<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span style='font-family:"Courier New";color:blue;background:black;
mso-highlight:black'>Dim</span><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'> MapName </span><span
style='font-family:"Courier New";color:blue;background:black;mso-highlight:
black'>As</span><span style='font-family:"Courier New";color:white;background:
black;mso-highlight:black'> </span><span style='font-family:"Courier New";
color:blue;background:black;mso-highlight:black'>String</span><span
style='font-family:"Courier New";color:white;background:black;mso-highlight:
black'> = MapDefId.Name<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span style='font-family:"Courier New";color:blue;background:black;
mso-highlight:black'>Dim</span><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'> Map </span><span
style='font-family:"Courier New";color:blue;background:black;mso-highlight:
black'>as</span><span style='font-family:"Courier New";color:white;background:
black;mso-highlight:black'> </span><span style='font-family:"Courier New";
color:blue;background:black;mso-highlight:black'>New</span><span
style='font-family:"Courier New";color:white;background:black;mso-highlight:
black'> MgMap(siteconnection)<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Map.Open(ResourceService, MapName)<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span style='font-family:"Courier New";color:blue;background:black;
mso-highlight:black'>Dim</span><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'> ParcelQuery </span><span
style='font-family:"Courier New";color:blue;background:black;mso-highlight:
black'>As</span><span style='font-family:"Courier New";color:white;background:
black;mso-highlight:black'> </span><span style='font-family:"Courier New";
color:blue;background:black;mso-highlight:black'>New</span><span
style='font-family:"Courier New";color:white;background:black;mso-highlight:
black'> MgFeatureQueryOptions<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
ParcelQuery.SetFilter(</span><span style='font-family:"Courier New";color:#A31515;
background:black;mso-highlight:black'>&quot;FeatId = 66&quot;</span><span
style='font-family:"Courier New";color:white;background:black;mso-highlight:
black'>)<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;</span><span
style='font-family:"Courier New";color:blue;background:black;mso-highlight:
black'>Dim</span><span style='font-family:"Courier New";color:white;background:
black;mso-highlight:black'> layer </span><span style='font-family:"Courier New";
color:blue;background:black;mso-highlight:black'>As</span><span
style='font-family:"Courier New";color:white;background:black;mso-highlight:
black'> MgLayer = Map.GetLayers().GetItem(</span><span style='font-family:"Courier New";
color:#A31515;background:black;mso-highlight:black'>&quot;pslc_cov_121206web&quot;</span><span
style='font-family:"Courier New";color:white;background:black;mso-highlight:
black'>)<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span style='font-family:"Courier New";color:blue;background:black;
mso-highlight:black'>dim</span><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'> FeatureService </span><span
style='font-family:"Courier New";color:blue;background:black;mso-highlight:
black'>as</span><span style='font-family:"Courier New";color:white;background:
black;mso-highlight:black'> mgfeatureservice =
siteconnection.CreateService(MgServiceType.FeatureService)<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span style='font-family:"Courier New";color:blue;background:black;
mso-highlight:black'>Dim</span><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'> fr </span><span
style='font-family:"Courier New";color:blue;background:black;mso-highlight:
black'>As</span><span style='font-family:"Courier New";color:white;background:
black;mso-highlight:black'> MgFeatureReader = FeatureService.SelectFeatures(</span><span
style='font-family:"Courier New";color:blue;background:black;mso-highlight:
black'>New</span><span style='font-family:"Courier New";color:white;background:
black;mso-highlight:black'> MgResourceIdentifier(layer.GetFeatureSourceId),
layer.GetFeatureClassName, ParcelQuery)<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
layer = Map.GetLayers().GetItem(</span><span style='font-family:"Courier New";
color:#A31515;background:black;mso-highlight:black'>&quot;pslc_cov_121206web&quot;</span><span
style='font-family:"Courier New";color:white;background:black;mso-highlight:
black'>)<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span style='font-family:"Courier New";color:blue;background:black;
mso-highlight:black'>Dim</span><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'> selection </span><span
style='font-family:"Courier New";color:blue;background:black;mso-highlight:
black'>As</span><span style='font-family:"Courier New";color:white;background:
black;mso-highlight:black'> </span><span style='font-family:"Courier New";
color:blue;background:black;mso-highlight:black'>New</span><span
style='font-family:"Courier New";color:white;background:black;mso-highlight:
black'> MgSelection(Map)<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
selection.AddFeatures(layer, fr, 0)<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;selection.Open(ResourceService,
MapName)<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
selectionXML = selection.ToXml()<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
selection.Save(ResourceService, MapName)<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Map.Save(ResourceService)<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
layer.ForceRefresh()<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span style='font-family:"Courier New";color:green;background:black;
mso-highlight:black'>'emit javascript to refresh map<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span style='font-family:"Courier New";color:blue;background:black;
mso-highlight:black'>Dim</span><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'> scriptKey </span><span
style='font-family:"Courier New";color:blue;background:black;mso-highlight:
black'>As</span><span style='font-family:"Courier New";color:white;background:
black;mso-highlight:black'> </span><span style='font-family:"Courier New";
color:blue;background:black;mso-highlight:black'>String</span><span
style='font-family:"Courier New";color:white;background:black;mso-highlight:
black'> = </span><span style='font-family:"Courier New";color:#A31515;
background:black;mso-highlight:black'>&quot;Refresh&quot;<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span style='font-family:"Courier New";color:blue;background:black;
mso-highlight:black'>If</span><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'> </span><span
style='font-family:"Courier New";color:blue;background:black;mso-highlight:
black'>Not</span><span style='font-family:"Courier New";color:white;background:
black;mso-highlight:black'> Page.ClientScript.IsStartupScriptRegistered(</span><span
style='font-family:"Courier New";color:blue;background:black;mso-highlight:
black'>Me</span><span style='font-family:"Courier New";color:white;background:
black;mso-highlight:black'>.GetType, scriptKey) </span><span style='font-family:
"Courier New";color:blue;background:black;mso-highlight:black'>Then<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span style='font-family:"Courier New";color:blue;background:black;
mso-highlight:black'>Dim</span><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'> javaScript </span><span
style='font-family:"Courier New";color:blue;background:black;mso-highlight:
black'>As</span><span style='font-family:"Courier New";color:white;background:
black;mso-highlight:black'> </span><span style='font-family:"Courier New";
color:blue;background:black;mso-highlight:black'>String</span><span
style='font-family:"Courier New";color:white;background:black;mso-highlight:
black'> = </span><span style='font-family:"Courier New";color:#A31515;
background:black;mso-highlight:black'>&quot;parent.parent.mapFrame.Refresh();parent.parent.mapFrame.location.reload(true);&quot;<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Page.ClientScript.RegisterStartupScript(</span><span style='font-family:"Courier New";
color:blue;background:black;mso-highlight:black'>Me</span><span
style='font-family:"Courier New";color:white;background:black;mso-highlight:
black'>.GetType, scriptKey, javaScript, </span><span style='font-family:"Courier New";
color:blue;background:black;mso-highlight:black'>True</span><span
style='font-family:"Courier New";color:white;background:black;mso-highlight:
black'>)<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span style='font-family:"Courier New";color:blue;background:black;
mso-highlight:black'>End</span><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'> </span><span
style='font-family:"Courier New";color:blue;background:black;mso-highlight:
black'>If<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'>&nbsp;&nbsp;&nbsp; </span><span
style='font-family:"Courier New";color:blue;background:black;mso-highlight:
black'>Catch</span><span style='font-family:"Courier New";color:white;
background:black;mso-highlight:black'> ex </span><span style='font-family:"Courier New";
color:blue;background:black;mso-highlight:black'>As</span><span
style='font-family:"Courier New";color:white;background:black;mso-highlight:
black'> Exception<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Response.Write(ex.Message + </span><span style='font-family:"Courier New";
color:#A31515;background:black;mso-highlight:black'>&quot;&lt;/br&gt;&quot;</span><span
style='font-family:"Courier New";color:white;background:black;mso-highlight:
black'> + ex.StackTrace)<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'>&nbsp;&nbsp;&nbsp; </span><span
style='font-family:"Courier New";color:blue;background:black;mso-highlight:
black'>End</span><span style='font-family:"Courier New";color:white;background:
black;mso-highlight:black'> </span><span style='font-family:"Courier New";
color:blue;background:black;mso-highlight:black'>Try<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'>&nbsp;&nbsp;&nbsp; <o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
background:yellow;mso-highlight:yellow'>%&gt;<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
background:yellow;mso-highlight:yellow'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:blue;background:black;mso-highlight:black'>&lt;/</span><span
style='font-family:"Courier New";color:#A31515;background:black;mso-highlight:
black'>body</span><span style='font-family:"Courier New";color:blue;background:
black;mso-highlight:black'>&gt;<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:blue;background:black;mso-highlight:black'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:blue;background:black;mso-highlight:black'>&lt;</span><span
style='font-family:"Courier New";color:#A31515;background:black;mso-highlight:
black'>script</span><span style='font-family:"Courier New";color:white;
background:black;mso-highlight:black'> </span><span style='font-family:"Courier New";
color:red;background:black;mso-highlight:black'>language</span><span
style='font-family:"Courier New";color:blue;background:black;mso-highlight:
black'>=&quot;javascript&quot;</span><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'> </span><span
style='font-family:"Courier New";color:red;background:black;mso-highlight:black'>type</span><span
style='font-family:"Courier New";color:blue;background:black;mso-highlight:
black'>=&quot;text/javascript&quot;&gt;<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:green;background:black;mso-highlight:black'>// Emit this function and
assocate it with the onLoad event<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:green;background:black;mso-highlight:black'>// for the page so that it
gets executed when this page<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:green;background:black;mso-highlight:black'>// loads in the browser. The
function calls the<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:green;background:black;mso-highlight:black'>// SetSelectionXML method on
the Viewer Frame, which updates<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:green;background:black;mso-highlight:black'>// the current selection on
the viewer and the server.<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:blue;background:black;mso-highlight:black'>function</span><span
style='font-family:"Courier New";color:white;background:black;mso-highlight:
black'> OnPageLoad()<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'>{<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'>&nbsp;&nbsp;&nbsp;
selectionXml = &lt;%=selectionXml%&gt;;<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'>&nbsp;&nbsp;&nbsp;
parent.parent.SetSelectionXML(selectionXml);<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'>&nbsp;&nbsp;&nbsp;
parent.parent.mapframe.refresh();<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:white;background:black;mso-highlight:black'>}<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:blue;background:black;mso-highlight:black'>&lt;/</span><span
style='font-family:"Courier New";color:#A31515;background:black;mso-highlight:
black'>script</span><span style='font-family:"Courier New";color:blue;
background:black;mso-highlight:black'>&gt;<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-family:"Courier New";
color:blue;background:black;mso-highlight:black'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-family:"Courier New";color:blue;
background:black;mso-highlight:black'>&lt;/</span><span style='font-family:
"Courier New";color:#A31515;background:black;mso-highlight:black'>html</span><span
style='font-family:"Courier New";color:blue;background:black;mso-highlight:
black'>&gt;</span><o:p></o:p></p>

</div>

</body>

</html>