asp.net mvc - Does Request.IsMvcAjaxRequest() method return true for requests originating from Ajax.ActionLink() click? -


i have controller action being executed link created using 'ajax.actionlink()' problem can't tell in action request ajax request because request.ismvcajaxrequest() returning false.

does request.ismvcajaxrequest() not work ajax.actionlink() generated requests?

here code using generate link:

<%= ajax.actionlink("delete", "delete", new { graphuri = viewdata.model.uri.value }, new ajaxoptions { confirm = "really delete?", onsuccess = "success", onfailure = "fail", httpmethod = "delete" }, new { title = "delete graph", @class = "deletegraphlink" })%> 

when @ code ismvcajaxrequest extension method looks work ajax forms , not ajax actionlinks.

update 11/13

if change httpmethod in ajaxoptions post, well. know how request.ismvcajaxrequest() work when using delete method?

there no form parameters on delete. try adding __mvcasyncpost=true route data (query parameter in url)


Comments

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

unit testing - How to mock PreferenceManager in Android? -