Wrox Programmer Forums
ASP.NET 4.5 General Discussion For ASP.NET 4.5 discussions not relating to a specific Wrox book
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 4.5 General Discussion section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old February 17th, 2016, 12:43 PM
Authorized User
Join Date: Oct 2015
Posts: 10
Thanks: 1
Thanked 0 Times in 0 Posts
Default Google Maps and AJAX

I am creating a store locator that displays a large map on page load and searches for stores when a user enters postcode/city, and displays them on a small map.

Next to the small map there is a Listview of the store details, with the Datapager.
When I click the pager buttons, the small map gets reloaded, and I don't want that. I tried using script manager in various places in the code but it seems to prevent the small map (and sometimes the storelist) from displaying. Can anyone help me with this please?

Here is the code (simplified, as there is quite a lot)
HTML Code:
<div class="container storelocator">
            <div class="row">
                <div class="col-md-12">
                    <h2>Store locator</h2>
                 <div class="col-md-6 storemap">
                        <div class="form-group">
                            <div class="input-group">
                                <asp:TextBox ID="TxBxTownPostcode"
runat="server" CssClass="form-control" placeholder="Enter your town or postcode"></asp:TextBox>
                                <span class="input-group-btn">
                                    <asp:Button ID="storeLocatorBtn" runat="server" CssClass="btn btn-default storeLocatorBtn" Text="Go!" OnClick="storeLocatorBtn_Click1" />

                        <asp:PlaceHolder ID="smallStoreMapPlcHldr" runat="server" Visible="false">   
                           <div id="map-canvas"></div>      

                    <asp:PlaceHolder ID="bigStoreMapPlcHldr" runat="server" Visible="true">
                            <div class="container">
                                <div class="row">
                                    <div class="col-md-12">
                                         <div id="map-canvas-big"></div>

                <asp:PlaceHolder ID="storelistPlcHldr" runat="server" Visible="false">
                  <div class="col-md-6 storelist">
                    <asp:ListView ID="storeList" runat="server" DataKeyNames="id" OnPagePropertiesChanging="storeList_PagePropertiesChanging" OnItemDataBound="storeList_ItemDataBound">
                            <table id="storeListTbl" cellpadding="2">
                                <tr id="itemPlaceholder" runat="server">
                            <asp:DataPager runat="server" ID="DataPager1" PageSize="3" PagedControlID="storeList">
                                   <asp:NextPreviousPagerField ButtonType="Link" ShowFirstPageButton="false" ShowPreviousPageButton="true"
                                        ShowNextPageButton="false" />
                                    <asp:NumericPagerField ButtonType="Link" />
                                    <asp:NextPreviousPagerField ButtonType="Link" ShowNextPageButton="true" ShowLastPageButton="false" ShowPreviousPageButton="false" />


                           //Item template here

Similar Threads
Thread Thread Starter Forum Replies Last Post
coordinates google maps etxJS sedoyksa Javascript 0 October 31st, 2011 07:33 PM
Google maps Geocode avi1 ASP.NET 3.5 Basics 0 October 24th, 2010 01:49 AM
com.google.android.maps library unavailable lz1234 BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2 1 June 7th, 2009 10:18 AM
Bills Whiz Bang Google Maps ramone_johnny Classic ASP Basics 2 August 1st, 2008 07:23 PM
XSL, Javascript and Google maps.. tomharding XSLT 2 March 14th, 2007 06:10 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.