tags:

views:

33

answers:

2

Hi

i want redirect ALL ajax requests(with X-Requested-With:XMLHttpRequest in header) to action: ajax(string function, string args) . How can i do it?

For example: browser send ajax query with paramerts function=getImage&args=4 to url http://localhost/post/123 but we redirect query to http://localhost/ajax.

A: 

Probably something like Server.Transfer() would work best

jarrett
+1  A: 

Use a custom route and/or route constraint.

Look here for more info.

Lorenzo