DJIceSpike
New Member
Don't know if this is a character encoding issueI made a POST request to a asp.net page, I send an XML, in order to get the value into a variable I made this\[code\]String selectionXml = HttpUtility.UrlDecode(Request.Params["SELECTION"]);\[/code\]This is an example of my xml\[code\]<?xml version="1.0" encoding="UTF-8"?><FeatureSet><Layer id="0adcf012"><Class id="MyTable"><ID>AAAAAAAmvEA=</ID><ID>AAAAAAC+5EA=</ID></Class></Layer></FeatureSet>\[/code\]The problem is, when I perform the above sentence I get this xml\[code\]<?xml version="1.0" encoding="UTF-8"?><FeatureSet><Layer id="0adcf012"><Class id="MyTable"><ID>AAAAAAAmvEA=</ID><ID>AAAAAAC 5EA=</ID></Class></Layer></FeatureSet>\[/code\]i.e. the second ID tag (AAAAAAC 5EA=) appears without the plus sign (+) unlike the original xml (AAAAAAC+5EA=)How can I fix this issue?EDIT: I add more code, this is my asp.net page (using the mapguide library)\[code\]<%@ Page Language="C#" Debug="true" validateRequest="false"%><%@ Import Namespace="System" %><%@ Import Namespace="System.Collections.Specialized" %><%@ Import Namespace="System.IO" %><%@ Import Namespace="OSGeo.MapGuide" %><!-- #Include File="common.aspx" --><% Response.Charset = "utf-8"; String sessionId; String mapName; String locale; int target=0; int popup=0; String selectedLayer; MgSelection selection = null; sessionId = Request.Params["SESSION"]; mapName = Request.Params["MAPNAME"]; locale = Request.Params["LOCALE"]; target = int.Parse(Request.Params["TGT"]); popup = int.Parse(Request.Params["POPUP"]); selectedLayer = Request.Params["LAYERTARGET"]; bool todos = false; try { // Initialize the Web Extensions and connect to the Server using // the Web Extensions session identifier stored in PHP session state. //MapGuideApi.MgInitializeWebTier (Constants.WebConfigPath); InitializeWebTier(); MgUserInformation userInfo = new MgUserInformation(sessionId); MgSiteConnection siteConnection = new MgSiteConnection(); siteConnection.Open(userInfo); MgMap map = new MgMap(siteConnection); map.Open(mapName); // ---------------------------------------------------------- // Use the following code for AJAX or DWF Viewers // This requires passing selection data via HTTP POST MgReadOnlyLayerCollection layers = null; **String selectionXml = HttpUtility.UrlDecode(Request.Params["SELECTION"]);** if (selectionXml!= null) { selection = new MgSelection(map, selectionXml); layers = selection.GetLayers(); } ..........\[/code\]