In ASP.NET MVC 3, I am using JSON in my AJAX calls. when i am running my application using visual studio on my development machine application works fine. But If i Publish the same application and try to access it using Virtual Directory i am getting the error JSON is Undefined.
Code
function PopulateData() {
$.ajax({ url: '../Home/Populate/',//**Error Line**
type: 'POST',
data: JSON.stringify({
'id':@ViewBag.Id }),
dataType: 'json',
contentType: "application/json; charset=utf-8",
success: function (data)
{
//code
} // ajax callback
}); // ajax call
}
Please Reply