Click here to Skip to main content
15,911,035 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Dear all,
i am using asp.net. i did bind google map with in div of my login page its working fine when load the page. but when i type the user name to the text box and enter the Enter button that time google map not showing what is the problem on my page.

//Html Code

//Java script

HTML
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js">
    </script>



<script type="text/javascript">
function initialize() {
var mapProp = {
center: new google.maps.LatLng(20.5937, 78.9629),
zoom: 9,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("map"), mapProp);
}
google.maps.event.addDomListener(window, 'load', initialize);
</script>

//LoginBox

ASP.NET
<body background="skyBackground.jpg" >
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>

ASP.NET
<asp:UpdatePanel ID="upPanel" runat="server">
                   <ContentTemplate>


ASP.NET
<div id="lalUser" style="margin-left: 2%; margin-top: 16px; position: absolute; color: darkblue;">
                            <asp:Label ID="lblUser" runat="server" Text="UserName"></asp:Label>
                        </div>

<asp:TextBox ID="txtUserName1" runat="server" Width="100%" Height="100%" OnTextChanged="txtUserName1_TextChanged"
Style="border: 3px solid #63FF00;" >

<asp:TextBox ID="txtPassword1" runat="server" Width="100%" Height="100%" OnTextChanged="txtPassword1_TextChanged"
TextMode="Password" Style="border: 3px solid #63FF00;" >
//load Map
HTML
<div id="map" class="loadmap">
                    </div>


</ContentTemplate>
</asp:UpdatePanel>

Regards,
Karthik

What I have tried:

i tried to load the google map.
Posted
Updated 12-May-16 23:51pm
v3
Comments
Karthik_Mahalingam 13-May-16 3:52am    
post your code.
Member 11889799 13-May-16 4:07am    
posted my html code check it.
Karthik_Mahalingam 13-May-16 4:54am    
Always use  Reply button, to post Comments/query to the user, else the User wont get notified.
Member 11889799 13-May-16 5:27am    
k Karthik.

1 solution

Place the map div outside the Update Panel.

ie

Place this:

<div id="map" class="loadmap"> </div>


after (below) this:

</ContentTemplate>
</asp:UpdatePanel>
 
Share this answer
 
v3
Comments
Member 11889799 13-May-16 6:23am    
hi,
Now its working fine thanks for solution.
iamcpmember 13-May-16 7:20am    
welcome

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900