Update Panel Question

Last post 7/24/2009 12:06:21 AM by Chris Pietschmann. 4 replies. << Back to Web.Maps.VE v2.0 General
6/11/2009 1:52:42 PM
gbrodie

Update Panel Question

   I have a table with 2 rows and 2 columns - which currently have 3 update panels (the third one spans 2 columns) One update panel changes what is shows, depending on events on both another panel and based upon what is in the update panel itself. This update panel consists of three panels, one with your map control, the others do not have a map control.

Your documentation reccomends that I not place your control in an update panel (even thought nesting of panels in general is allowed), so my question is how can I "toggle" between the three panels, without doing a complete post to the page, utilizing update panels with your Map showing?

6/11/2009 4:24:44 PM
gbrodie

Re:Update Panel Question

As an update - if I remove it from the update panel, i get errors when I try to hide the Panel the map is in when the Async Post Back fires in another update panel.

If I leave it in the update panel, most of the time it works without issue. However, for one event, I get this error:

ScriptLoadFailedException... the Script ... contains multiple calls to Sys.Application.notifyScriptLoaded() Only one is allowed.

6/19/2009 3:41:03 AM
Chris Pietschmann

Re:Update Panel Question

Could you post some sample code that duplicates the issue?

And, the Web.Maps.VE control is not supported when used within an UpdatePanel control. It is designed to function only outside of any UpdatePanels.
7/9/2009 8:59:44 PM
gbrodie

Re:Update Panel Question

I took a bunch of detail out, but left the framework of what I am doing. As indicated, I am trying to toggle between your map control and details by hiding and showing the panels - I did not include the code behind becuase I assume that is not particularly relevant. There is also a shadow display behind the map as well. It all seems to work fine. Expcept when I try to switch VS2008SP1 into split or design view i get an error:

updatepanel could not be set on property...

When I remove your control, it goes away.

 

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

<ContentTemplate>

<asp:Panel ID="pnlMap" runat="server" Height="330px" meta:resourcekey="Panel1Resource1" Width="790px" >

<Simplovation:Map runat="server" ID="Map1" Width="790px" Height="330px" DashboardSize="Normal" ShowSwitch="true"

Latitude="38" Longitude="-100" />

<cc1:DropShadowExtender ID="DropShadowExtender3" runat="server" TargetControlID="pnlMap"

Rounded="True" Opacity="0.2" Enabled="True">

</cc1:DropShadowExtender>

</asp:Panel>

<asp:Panel ID="pnlTripDetail" runat="server" Height="330px" Visible="false" BackColor="Azure"

meta:resourcekey="pnlTripDetailResource1" Width="790px" >

<asp:FormView id="frmTripDetail" runat="server"

AutoGenerateColumns="True" meta:resourcekey="FormViewTripResource1" >

<ItemTemplate>

<table cellspacing="4" cellpadding="0" border="0" width="790px" >

<tr> <td colspan="6">

<asp:Label ID="Label12" SkinID="XSmallB" runat="server"

Text="Trip Detail" meta:resourcekey="lblTripDetailResource1" ></asp:Label></td>

<td></tr>

</table>

</ItemTemplate>

</asp:FormView>

<cc1:DropShadowExtender ID="DropShadowExtender4" runat="server" TargetControlID="pnlTripDetail"

Rounded="True" Opacity="0.2" Enabled="True">

</cc1:DropShadowExtender>

</asp:Panel>

<asp:Panel ID="pnlNewSegment" runat="server" BackColor="Azure" Height="330px"

meta:resourcekey="Panel1Resource1" Width="790px" >

<table cellspacing="4" cellpadding="0" border="0" width="790px">

<tr> <td colspan="2">

<asp:Label ID="lblTravelRequest" SkinID="XSmallB" runat="server"

Text="Travel Request" meta:resourcekey="lblTravelRequestResource1" ></asp:Label></td>

</tr>

<tr><td align="left" colspan="4">

<asp:GridView runat="server" ID="gvwLocator" AutoGenerateColumns="False"

ShowFooter="False" OnRowCommand="gvwLocator_RowCommand" >

<Columns>

</Columns>

</asp:GridView>

</td></tr>

</table>

<cc1:DropShadowExtender ID="DropShadowExtender1" runat="server" TargetControlID="pnlNewSegment"

Rounded="True" Opacity="0.2" Enabled="True">

</cc1:DropShadowExtender>

</asp:Panel>

</ContentTemplate>

<Triggers>

<asp:AsyncPostBackTrigger ControlID="frmViewTrip" />

<asp:PostBackTrigger ControlID="AddTripDetails"/>

<asp:AsyncPostBackTrigger ControlID="btnFind" EventName="Click" />

</asp:UpdatePanel>

7/24/2009 12:06:21 AM
Chris Pietschmann

Re:Update Panel Question

You need to move the Simplovation Web.Maps.VE control outside of any UpdatePanels on the Page. The Map control is built to work along-side UpdatePanels, not within them. So consiquentially it is not supported to use the Web.Maps.VE Map control within an UpdatePanel control.