I'm using MapSuite Web Edition 3.0 beta in a WebForm that has a master page. I can get the initial map to display but the Pan Zoom Bar and any AJAX capabilities seem to be unavailable/disabled. When I put the same control and code in a standard WebForm page with no master page everything works as it should.
I've proven this by creating a sample web app with two forms and one master page. The web form without the master page works properly, the one with the master page does not.
Is there a problem using the Map control in a WebForm with a master page?
Thanks for your rapid reply!
The map controls on each page are in an update panel. However, I've tried it outside an update panel on the master page example with the same result.
I attempted to attached a zipped archive to this post but I get an error indicating the file exceeds the max size of 250Kb despite the fact that the file is only 6Kb in size. If you can tell me how to get around this limitation I will happily transmit the file.
The project contains two web forms, Default.aspx and Default2.aspx and a master page MasterPage.master. Default.aspx has the map control within an update panel like so:
The master page has the following contents:
<form>> id="form1" runat="server"> <asp:contentplaceholder id=""ContentPlaceHolder1"" runat=""server"">
</asp:contentplaceholder>
</form>
And Default.aspx has the following content<asp:content id=""Content2"" runat=""Server"" contentplaceholderid=""ContentPlaceHolder1""><asp:updatepanel id=""upnlMap"" runat=""server"" updatemode=""Conditional"">
<contenttemplate></contenttemplate>
</asp:updatepanel></asp:content>
Both Default.aspx and Default2.aspx have the following Page_Load code:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not IsPostBack() Then
Map1.MapUnit = GeographyUnit.DecimalDegree
MapHelpers.AddLayersForSimpleRenderUSA(Map1)
Map1.PanZoomBar.Enabled = True
Map1.LayerSwitcher.Enabled = True
Map1.MousePosition.Enabled = True
Map1.BackgroundMap.GoogleMap.GoogleMapType = GoogleMapType.Normal
Map1.BackgroundMap.GoogleMap.Name = "Google Map Layer"
Map1.CurrentExtent = New RectangleShape(-94.64456, 39.13578, -94.4674, 39.03605)
End If
End Sub
The "MapHelpers.AddLayersForSimpleRenderUSA" method is verbatim what is in your samples.
Thanks for looking into this.
Bob Mc.