<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML
dir=ltr><HEAD><TITLE>[mapguide-users] Listing Active selected feature C#</TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.5730.11" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=063391319-21012007><FONT face=Arial
color=#0000ff size=2>Greg,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=063391319-21012007><FONT face=Arial
color=#0000ff size=2>Would it be possible for you to post the example to the
group? The list should accept plain text file attachments or you could
paste it into the message body.</FONT></SPAN></DIV>
<DIV> </DIV><!-- Converted from text/rtf format -->
<P><SPAN lang=en-us><FONT face=Tahoma size=1>Andy </FONT></SPAN><BR></P>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> mapguide-users-bounces@lists.osgeo.org
[mailto:mapguide-users-bounces@lists.osgeo.org] <B>On Behalf Of </B>Knight,
Gregory<BR><B>Sent:</B> Sunday, January 21, 2007 10:43 AM<BR><B>To:</B> Nimrod
Cnaan; mapguide-users@lists.osgeo.org<BR><B>Subject:</B> RE: [mapguide-users]
Listing Active selected feature C#<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV id=idOWAReplyText41468 dir=ltr>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2>I have a C# example where I
am doing exactly this. I can send you the page via separate means if you are
interested.</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>Greg</FONT></DIV></DIV>
<DIV dir=ltr><BR>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> mapguide-users-bounces@lists.osgeo.org on
behalf of Nimrod Cnaan<BR><B>Sent:</B> Sat 1/20/2007 9:13 AM<BR><B>To:</B>
mapguide-users@lists.osgeo.org<BR><B>Subject:</B> [mapguide-users] Listing
Active selected feature C#<BR></FONT><BR></DIV>
<DIV><BR>
<P><FONT size=2>I am attempting to get the list of selected parcels by using
“Invoke URL”<BR>command, passing “$Current Selection” to my
“listdwfparcels.aspx” page,<BR>through the key & value pair.<BR><BR>I don’t
know what I’m doing wrong, getting unclassified
exception<BR>“MgSelection.FromXml” . . .<BR><BR>Checking the value of my mgkey
content “$Current Selection”
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’m using –<BR><BR>String mgSessionId =
GetParameters()["SESSION"];<BR>String mgSelection =
GetParameters()["mgkey"];<BR>MgResourceIdentifier
layerFeatureResource;<BR>MgReadOnlyLayerCollection layers;<BR>MgSelection
selection;<BR>MgLayer layer;<BR>string layerClassName;<BR>string
selectionString;<BR>string
layerFeatureId;<BR> <BR> <BR> try<BR>
{<BR> InitializeWebTier();<BR><BR> MgUserInformation userInfo = new
MgUserInformation(mgSessionId);<BR> MgSiteConnection siteConnection = new
MgSiteConnection();<BR> siteConnection.Open(userInfo);<BR><BR>
MgResourceService resourceService
=<BR>siteConnection.CreateService(MgServiceType.ResourceService)
as<BR>MgResourceService;<BR> MgFeatureService featureService
=<BR>siteConnection.CreateService(MgServiceType.FeatureService)
as<BR>MgFeatureService;<BR> MgFeatureQueryOptions queryOptions = new
MgFeatureQueryOptions();<BR> <BR> MgMap map = new
MgMap();<BR> map.Open(resourceService, "HaifaMap");<BR> <BR>if
(GetParameters()["SESSION"] != "")<BR>{<BR> selection = new
MgSelection(map, mgSelection);<BR><BR><<<<< MY ERROR
>>>>><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 – GIS Senior Programmer<BR>Haifa Municipality,
Israel<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><BR></FONT></P></DIV>
<P>
<HR SIZE=1>
<P></P><BR>
<P><STRONG><BR>The substance of this message, including any attachments, may
be<BR>confidential, legally<BR>privileged and/or exempt from disclosure pursuant
to Massachusetts<BR>law. It is intended<BR>solely for the addressee. If you
received this in error, please<BR>contact the sender and<BR>delete the material
from any computer.<BR></STRONG></P></BODY></HTML>