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

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

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -