<!--
Author : Jignesh Darji
Date : 25 FEB 2017
Content Type: Open Source
Content For :www.w3codeschool.com -->
////Controller
[HttpGet]
public JsonResult getUserLocation(string location,string latitude,string longitude)
{
try
{
TempData[Constants.Temp_Location] = location;
TempData[Constants.Temp_Location_Lat] = latitude;
TempData[Constants.Temp_Location_Lng] = longitude;
}
catch (Exception ex)
{
LogUtil.Error(ex);
return null;
}
return Json("Success");
}
////call using ajax jquery
$(document).ready(function () {
$.ajax({
dataType: "json",
url: "/home/getUserLocation",
data: { "location": results[0].formatted_address, "latitude": myLatitude, "longitude": myLongitude },
success: function () { }
});
});
Author : Jignesh Darji
Date : 25 FEB 2017
Content Type: Open Source
Content For :www.w3codeschool.com -->
////Controller
[HttpGet]
public JsonResult getUserLocation(string location,string latitude,string longitude)
{
try
{
TempData[Constants.Temp_Location] = location;
TempData[Constants.Temp_Location_Lat] = latitude;
TempData[Constants.Temp_Location_Lng] = longitude;
}
catch (Exception ex)
{
LogUtil.Error(ex);
return null;
}
return Json("Success");
}
////call using ajax jquery
$(document).ready(function () {
$.ajax({
dataType: "json",
url: "/home/getUserLocation",
data: { "location": results[0].formatted_address, "latitude": myLatitude, "longitude": myLongitude },
success: function () { }
});
});
0 Comments