<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:st1="urn:schemas-microsoft-com:office:smarttags" 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 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<title>[mapguide-users] Listing Active selected feature C#</title>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="State"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="country-region"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="City"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="place"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"Trebuchet MS";
        panose-1:2 11 6 3 2 2 2 2 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
p
        {mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman";}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Trebuchet MS";
        color:blue;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=blue>

<div class=Section1>

<p class=MsoNormal><font size=2 color=blue face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS";color:blue'>Certainly&#8230;&nbsp;
Ill pull it together and post it a bit later today.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS";color:blue'><o:p>&nbsp;</o:p></span></font></p>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
mapguide-users-bounces@lists.osgeo.org
[mailto:mapguide-users-bounces@lists.osgeo.org] <b><span style='font-weight:
bold'>On Behalf Of </span></b>Andy Morsell<br>
<b><span style='font-weight:bold'>Sent:</span></b> Sunday, January 21, 2007
2:15 PM<br>
<b><span style='font-weight:bold'>To:</span></b> mapguide-users@lists.osgeo.org<br>
<b><span style='font-weight:bold'>Subject:</span></b> RE: [mapguide-users]
Listing Active selected feature C#</span></font><o:p></o:p></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:blue'>Greg,</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=blue face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:blue'>Would it be possible for you to post the
example to the group?&nbsp; The list should accept plain text file attachments
or you could paste it into the message body.</span></font><o:p></o:p></p>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>&nbsp;<o:p></o:p></span></font></p>

</div>

<p><font size=1 face=Tahoma><span style='font-size:7.5pt;font-family:Tahoma'><!-- Converted from text/rtf format -->Andy
</span></font><o:p></o:p></p>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabIndex=-1>

</span></font></div>

<p class=MsoNormal style='margin-bottom:12.0pt'><b><font size=2 face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma;font-weight:bold'>From:</span></font></b><font
size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
mapguide-users-bounces@lists.osgeo.org
[mailto:mapguide-users-bounces@lists.osgeo.org] <b><span style='font-weight:
bold'>On Behalf Of </span></b>Knight, Gregory<br>
<b><span style='font-weight:bold'>Sent:</span></b> Sunday, January 21, 2007
10:43 AM<br>
<b><span style='font-weight:bold'>To:</span></b> Nimrod Cnaan;
mapguide-users@lists.osgeo.org<br>
<b><span style='font-weight:bold'>Subject:</span></b> RE: [mapguide-users]
Listing Active selected feature C#</span></font><o:p></o:p></p>

<div id=idOWAReplyText41468>

<div>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:black'>I have a C# example where I am doing
exactly this. I can send you the page via separate means if you are interested.</span></font><o:p></o:p></p>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>&nbsp;<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Greg</span></font><o:p></o:p></p>

</div>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabIndex=-1>

</span></font></div>

<p class=MsoNormal style='margin-bottom:12.0pt'><b><font size=2 face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma;font-weight:bold'>From:</span></font></b><font
size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
mapguide-users-bounces@lists.osgeo.org on behalf of Nimrod Cnaan<br>
<b><span style='font-weight:bold'>Sent:</span></b> Sat 1/20/2007 9:13 AM<br>
<b><span style='font-weight:bold'>To:</span></b> mapguide-users@lists.osgeo.org<br>
<b><span style='font-weight:bold'>Subject:</span></b> [mapguide-users] Listing Active
selected feature C#</span></font><o:p></o:p></p>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'>I am
attempting to get the list of selected parcels by using &#8220;Invoke
URL&#8221;<br>
command, passing &#8220;$Current Selection&#8221; to my
&#8220;listdwfparcels.aspx&#8221; page,<br>
through the key &amp; value pair.<br>
<br>
I don&#8217;t know what I&#8217;m doing wrong, getting unclassified exception<br>
&#8220;MgSelection.FromXml&#8221; . . .<br>
<br>
Checking the value of my mgkey content &#8220;$Current Selection&#8221;
returns:<br>
<br>
%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%0A%3CFeatureSet%3E%0A%3CLayer%20id%3D%22d6a8101a-ffff-ffff-8003-000000000038%22%3E%0A%3CClass%20id%3D%22Default%3AHelkot%22%3E%0A%3CID%3ETAAAAA%3D%3D%3C%2FID%3E%0A%3CID%3EVwAAAA%3D%3D%3C%2FID%3E%0A%3CID%3EVgAAAA%3D%3D%3C%2FID%3E%0A%3C%2FClass%3E%0A%3C%2FLayer%3E%0A%3C%2FFeatureSet%3E%0A<br>
<br>
Here is portion of the code that I&#8217;m using &#8211;<br>
<br>
String mgSessionId = GetParameters()[&quot;SESSION&quot;];<br>
String mgSelection = GetParameters()[&quot;mgkey&quot;];<br>
MgResourceIdentifier layerFeatureResource;<br>
MgReadOnlyLayerCollection layers;<br>
MgSelection selection;<br>
MgLayer layer;<br>
string layerClassName;<br>
string selectionString;<br>
string layerFeatureId;<br>
&nbsp;<br>
&nbsp;<br>
&nbsp;try<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>
&nbsp; InitializeWebTier();<br>
<br>
&nbsp; MgUserInformation userInfo = new MgUserInformation(mgSessionId);<br>
&nbsp; MgSiteConnection siteConnection = new MgSiteConnection();<br>
&nbsp; siteConnection.Open(userInfo);<br>
<br>
&nbsp; MgResourceService resourceService =<br>
siteConnection.CreateService(MgServiceType.ResourceService) as<br>
MgResourceService;<br>
&nbsp; MgFeatureService featureService =<br>
siteConnection.CreateService(MgServiceType.FeatureService) as<br>
MgFeatureService;<br>
&nbsp; MgFeatureQueryOptions queryOptions = new MgFeatureQueryOptions();<br>
&nbsp;&nbsp;<br>
&nbsp; MgMap map = new MgMap();<br>
&nbsp; map.Open(resourceService, &quot;HaifaMap&quot;);<br>
&nbsp;&nbsp;<br>
if (GetParameters()[&quot;SESSION&quot;] != &quot;&quot;)<br>
{<br>
&nbsp;&nbsp;&nbsp; selection = new MgSelection(map, mgSelection);<br>
<br>
&lt;&lt;&lt;&lt;&lt; MY ERROR &gt;&gt;&gt;&gt;&gt;<br>
An unclassified exception occurred.An unclassified exception occurred.<br>
Exception occurred in method MgSelection.FromXml at line 158 in file<br>
c:\build_tux_area\mgdev_opensource\common\service\maplayer\Selection.cpp<br>
<br>
<br>
Nimrod Cnaan &#8211; GIS Senior Programmer<br>
<st1:place w:st="on"><st1:City w:st="on">Haifa Municipality</st1:City>, <st1:country-region
 w:st="on">Israel</st1:country-region></st1:place><br>
Phon:972525355483<br>
<br>
--<br>
View this message in context: <a
href="http://www.nabble.com/Listing-Active-selected-feature-C--tf3045397s16610.html#a8465318">http://www.nabble.com/Listing-Active-selected-feature-C--tf3045397s16610.html#a8465318</a><br>
Sent from the MapGuide Users mailing list archive at Nabble.com.<br>
<br>
_______________________________________________<br>
mapguide-users mailing list<br>
mapguide-users@lists.osgeo.org<br>
<a href="http://lists.osgeo.org/mailman/listinfo/mapguide-users">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a></span></font><o:p></o:p></p>

</div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=1 width="100%" align=center>

</span></font></div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p><b><font size=3 face="Times New Roman"><span style='font-size:12.0pt;
font-weight:bold'><br>
<strong><b><font face="Times New Roman">The substance of this message,
including any attachments, may be</font></b></strong><br>
<strong><b><font face="Times New Roman">confidential, legally</font></b></strong><br>
<strong><b><font face="Times New Roman">privileged and/or exempt from
disclosure pursuant to <st1:State w:st="on"><st1:place w:st="on">Massachusetts</st1:place></st1:State></font></b></strong><br>
<strong><b><font face="Times New Roman">law. It is intended</font></b></strong><br>
<strong><b><font face="Times New Roman">solely for the addressee. If you
received this in error, please</font></b></strong><br>
<strong><b><font face="Times New Roman">contact the sender and</font></b></strong><br>
<strong><b><font face="Times New Roman">delete the material from any computer.</font></b></strong></span></font></b><o:p></o:p></p>

</div>

</body>

</html>