Reputation: 16297
Are these two the same essentially? I am just noticing that Request.IsMvcAjaxRequest()
does not show up in my code hint as it does in the tutorial video here. I am using ASP.net MVC 3
Upvotes: 1
Views: 280
Reputation: 59002
The ASP.NET MVC RC Release Notes states that IsMvcAjaxRequest is renamed to IsAjaxRequest. This means that you should just use IsAjaxRequest.
Quote from release notes:
The IsMvcAjaxRequest method been renamed to IsAjaxRequest. As part of this change, the IsAjaxRequest method was updated to recognize the X-Requested-With HTTP header. This is a well known header sent by the major JavaScript libraries such as Prototype.js, jQuery, and Dojo. The ASP.NET AJAX helpers were updated to send this header in requests. However, they continue to also send it in the body of the form post in order to work around the issue of firewalls that strip unknown headers.
Upvotes: 4