Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning ASP.NET 4.5 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4.5: in C# and VB by Imar Spaanjaars; ISBN: 978-1-118-31180-6
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4.5 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 16th, 2016, 11:37 AM
Authorized User
Points: 44, Level: 1
Points: 44, Level: 1 Points: 44, Level: 1 Points: 44, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2015
Posts: 10
Thanks: 1
Thanked 0 Times in 0 Posts
Default AJAX with googleMaps

Hi,

I am creating a store locator that displays a large map on page load and searches for stores when a user enters postcode/city.
Next to the map there is a listview of the store details with the datapager.
When I click the pager buttons, the map gets reloaded, and I don't want that. I tried using script manager in various places in the script but it seems to prevent the small map (and sometimes storelist) from displaying. Can anyone help me with this please?


Here is the code (simplified, as there is quite a lot)
Thanks

HTML Code:
<div class="container storelocator">
            <div class="row">
                <div class="col-md-12">
                    <h2>Store locator</h2>
                </div>
                 <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" />

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


                   </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>
                                    </div>
                                </div>
                            </div>
                    </asp:PlaceHolder>

                <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">
                        <LayoutTemplate>
                            <table id="storeListTbl" cellpadding="2">
                                <tr id="itemPlaceholder" runat="server">
                                    <td></td>
                                </tr>
                            </table>
                           
                            <asp:DataPager runat="server" ID="DataPager1" PageSize="3" PagedControlID="storeList">
                                <Fields>
                    
                                   <asp:NextPreviousPagerField ButtonType="Link" ShowFirstPageButton="false" ShowPreviousPageButton="true"
                                        ShowNextPageButton="false" />
                                    <asp:NumericPagerField ButtonType="Link" />
                                    <asp:NextPreviousPagerField ButtonType="Link" ShowNextPageButton="true" ShowLastPageButton="false" ShowPreviousPageButton="false" />
                            </Fields>
                            </asp:DataPager>
                        </LayoutTemplate>


                        <ItemTemplate>

                           //Item template here
                        </ItemTemplate>
                    </asp:ListView>
                </div>
            </asp:PlaceHolder>
            </div>
         </div>
[/LEFT]
Reply With Quote
  #2 (permalink)  
Old February 16th, 2016, 03:38 PM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Hard to say without knowing a lot more about your setup. Since this isn't related to my book directly, I would recommend posting this in the general ASP.NET category here: http://p2p.wrox.com/asp-net-4-5-709/ and provide more information. That might attract others too that can hopefully help you out.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Reply With Quote
  #3 (permalink)  
Old February 17th, 2016, 12:44 PM
Authorized User
Points: 44, Level: 1
Points: 44, Level: 1 Points: 44, Level: 1 Points: 44, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2015
Posts: 10
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Thanks, Imaar!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Googlemaps TechGen ASP.NET 3.5 Professionals 0 May 24th, 2010 11:07 AM
Recommend an AJAX IDE - JoyiStar AJAX WebShop. kingstar Ajax 4 December 15th, 2006 05:12 AM
New Ajax article: Creating an Ajax Search W jminatel BOOK: Professional JavaScript for Web Developers ISBN: 978-0-7645-7908-0 1 May 11th, 2006 03:45 PM
new Ajax article: Creating an Ajax Search Widget jminatel Ajax 0 May 11th, 2006 02:50 PM
New Ajax Article: Ajax Submission Throttling jminatel Ajax 0 April 11th, 2006 08:00 PM



All times are GMT -4. The time now is 10:24 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.