Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6074477
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T10:23:10+00:00 2026-05-23T10:23:10+00:00

I have a newbie question. If in my asp.net application I need to query

  • 0

I have a newbie question.
If in my asp.net application I need to query the database and get a set of Google markers to display on the map. I’m new to web development, so I’m not sure how the data can be passed from asp.net to JavaScript. Is it done with a WebService called from the JavaScript or is there another way to do it ? I’m probably misunderstanding some major concepts. As well, is there a way to pass data from JavaScript to asp.net application (e.g. something was don on the Google map and the data should be stored to the database on the back-end). If this is too basic, any links will be appreciated. Thanks !

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T10:23:10+00:00Added an answer on May 23, 2026 at 10:23 am

    Well, this is how I would do it (FYI, this relies heavily on the JQuery javascript library):

    1. Declare your <div> where your map will be displayed.
    2. use a $(document).ready() handler to wait until the DOM is loaded to start your request
    3. Use an asynchronous JQuery $.ajax call to a WCF or ASMX web service that returns JSON representing your marker data.

    Here is a rough cut at some code:

    ... your web page
    
    <script>
    $(document.)ready(function() {
    
    $.ajax(
    
     url: "mapquery.asmx",
     async: true,
     dataType: json,
     success: function(data)
     {
        var map = new GMap2(document.getElementById("map_div"));
        for (int i = 0; i < data.length; i++)
        {
           var point = new GLatLng(data.results[i].lat,
                                   data.results[i].lng);
           var marker = createMarker(point, data.results[i].desc, 
                                     data.results[i].type);
           map.addOverlay(marker);
        }
     }
    );
    
    });
    </script>
    

    example json returned from mapquery.asmx:

    results = [ {
          lat: 41.765,
          lng: 80.572
          desc: "My house",
          type: "X"
       },
       {
          lat: 42.765,
          lng: 81.572
          desc: "Friend's house",
          type: "X"
       }
    ]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Newbie question. I’m writing an ASP.Net MVC app in VB.Net and have been using
This is probably again a newbie question. When I create an ASP.NET MVC2 application,
C sharp newbie question...I have a simple asp.net form that has a textbox that
As a quazi-newbie to asp.net, I have a question about session variables. I'm building
I'm a newbie about ASP.NET MVC 3, but I have a simple question. Is
Hey all, this is a newbie ASP.NET MVC question. I have a view that
Extreme newbie question. I have my database (SQL Server) set up to cascade deletes
ASP.NET newbie question - fastest fingers! I have a page that needs to pull
ASP.NET MVC newbie question: I've set up a MVC site, with a few controllers.
I have a newbie question in JSF, and particular in Richfaces. I need my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.