Reputation: 753
What is Different Between AjaxContext and ContextSwitch ? What If i didnt use AjaxContext in my Async Ajax controller?
Upvotes: 2
Views: 305
Reputation: 33148
AjaxContext is a type of ContextSwitch, which switches context based on the presence of the the XMLHttpRequest header. ContextSwitch is a more generic way of switching contexts based on the presence of a format variable in the URL. E.g. you could set your routing up so that appending '.json' onto the request will get your controller to return a JSON response.
Upvotes: 4