Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @{
- ViewBag.Title = "Home Page";
- }
- @section Scripts {
- <script>
- var x = document.getElementById("demo");
- function getLocation() {
- if (navigator.geolocation) {
- navigator.geolocation.getCurrentPosition(showPosition);
- } else {
- x.innerHTML = "Geolocation is not supported by this browser.";
- }
- }
- function showPosition(position) {
- x.innerHTML = "Latitude: " + position.coords.latitude +
- "<br>Longitude: " + position.coords.longitude;
- }
- window.onload(getLocation());
- </script>
- }
- <div id="demo"></div>
- public async Task<ActionResult> Login(LoginViewModel model, string returnUrl) {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement