I have downloaded the C# source code for the vedio 14 on this site http://www.asp.net/mvc/videos (or see attached document for the full application) and converted it to mvc 2 and .net 4.0 using visual studio 2010.
The alert box(alert(customer.CustomerName)) in this code is not displaying when clicking the customer link.
$(document).ready(function() {
// alert("test");
$.getJSON("Customer/GetCustomer",null,function(customer){
alert(customer.CustomerName);
});
});
Loading
Bhavik SolankiPosted Nov 22, 2011, 11:28 PM
as per above details first check customer object has json data which you mention customer name
more detail check basic example
http://bhaviksoluckydotnet.blogspot.com/2011/11/ajax-save-in-mvc-30-using-jquery.html
Regards
Bhavik
Mpholo LeboeaPosted May 3, 2011, 5:29 PM
My question is why the alert box is not displayed as in the example in the video?
Shirsendu NandiPosted May 3, 2011, 3:48 AM
Please check this link.It will be help full to you.
http://james.newtonking.com/projects/json-net.aspx