AjaxMapControl inside Asp.net Ajax UpdatePanel

Topics: SharpMap Project, SharpMap v0.9 / v1.x, SharpMap v2.0, Web Controls
Aug 18, 2009 at 6:43 PM

Hi,

I am trying to buils a web based GIS app where in the user can select the ESRI shp file tey want to see in the map. The shp files are already located ion the web server, user would select them form the Dropdown. based upon their selection the files will be read and layers will be added to the map.

I have been trying to achieve the above by using asp.net ajax update panel so that i can do a partial post back. teh code for the same is:

<form id="form1" runat="server">

<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>

<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">   

     <asp:Panel Width="100%" Height="100%" runat="server" ID="Map">        
               <smap:AjaxMapControl  width="100%" height="750px" id="ajaxMap" runat="server" CssClass="Map" OnClickEvent="MapClicked" OnViewChange="ViewChanged" OnViewChanging="ViewChanging"  />

    </asp:Panel>

</asp:UpdatePanel>

</form>

when the page is rendered initially everything is good, however any subsequest changes to the map is not displayed i.e the Image form the memory stream is not being fetched to be displayed and we get a small square with a red cross("X"). I have also tried appending a GUID to the MapHandler.ashx, however it didnt work.

Basic requirement is to do a  partial post back of the web map control rather than full post back.

Any help on this is appreciated.