Tuesday, April 24, 2012

Public action method 'undefined' could not be found on controller

I have a page with an ActionLink on it:



@Html.ActionLink(@UserResource.MoreResults, "RowList", routeValues, new { id = "LoadMoreLink", @class = "btn primary small" })


With the following jQuery:



$("#LoadMoreLink").live("click", function () {
// Ajax call to load new results
$.get($(this).attr("href"), function (response) {
...
});
return false;
});


So everytime the link is clicked, I intercept it and perform a GET with ajax. The first time (and only the first time), I got the error below:



enter image description here



Then the code is paused. If I press F5 I can continue without problem. I noticed also that if I breakpoint in this code, the code is processed 2 times. I mean every step (F10) execute each line of code 2 times.



This problem is very strange because I copy/paste this all the code from somewhere else where this problem didn't occurred.



Any idea? Thanks.





No comments:

Post a Comment