Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


How to get Current location of mobile no. entered in webpage using asp.net

Posted on 2012-08-21
Medium Priority
Last Modified: 2012-09-21

In my web application there is requirement of  find the current location of specified mobile no. i.e. current Longitude & Latitude

 how can i achieved this,

pls guide.

Thanks & Regards
Question by:citadelind
  • 2

Accepted Solution

erik_nodland earned 1500 total points
ID: 38315610

You can use something like

function onPositionUpdate(position)
            var lat = position.coords.latitude;
            var lng = position.coords.longitude;
            alert("Current position: " + lat + " " + lng);
            alert("navigator.geolocation is not available");

As of today, the W3C Geolocation API (widely associated with, though not technically part of, HTML 5) has support in the following major desktop browsers:
 •Firefox (since 3.5)
 •Safari (since 5.0)
•Google Chrome (version depends on OS)
 •Opera (since 10.60)
 •Internet Explorer (since IE 9)
There are at least two mobile browsers that implement the Geolocation API:
 •Safari Mobile (since iPhone OS 3.0)
 •Android (since at least Android 1.6)
On all of these platforms, you should be able to use navigator.geolocation.getCurrentPosition, etc.
LVL 61

Expert Comment

by:Julian Hansen
ID: 38315621
@erik_nodland as far as I am aware this is an opt in function - unless it has been enabled in the browser it won't work - or have things changed?

Author Comment

ID: 38315639
My query is about i want to pass mobile no as argument  and application track its  current latitude,longitude

Expert Comment

ID: 38315680
Ahh sorry I misunderstood your question. As fas as I know there is no way of tracking somebodies location just by knowing their mobile number. There are services around which allow you to send your location knowingly but nothing covertly.


Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
The Relationships Diagram is a good way to get an overall view of what a database is keeping track of. It is also where relationships are defined. A relationship specifies how two tables connect to each other. As you build tables in Microsoft Ac…
Suggested Courses
Course of the Month13 days, 11 hours left to enroll

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question