简体   繁体   中英

Subgurim maps control wont render inside a Formview

I want to create a subgurim maps control inside a Formview in an asp.net web form page. When I add it to an item template in a formview it wont render. When I place it outside the Formview it renders fine. Is there something I am missing?

Code where it does not render:

<%@ Register Assembly="GMaps" Namespace="Subgurim.Controles" TagPrefix="maps" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="main" Runat="Server">
   <div id="content">
       <asp:FormView ID="FormView1" runat="server">
       <ItemTemplate>
           <maps:StaticGMap ID="StaticGMap1" runat="server"  format="png32" />
           <maps:GMap ID="GMap1" runat="server" />
           </ItemTemplate>
       </asp:FormView>    
   </div>
</asp:Content>

The problem is that Formview has not DataSourceID or DataSource . If you set a DataSource for your FormView You will see the map.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM