I've got problem with generating ajax anchors. I'm using simple
Ajax.ActionLink("test", "Test", new AjaxOptions { UpdateTargetId="test", HttpMethod="GET" })
and开发者_如何学编程 the generated markup is:
<a data-ajax="true" data-ajax-method="GET" data-ajax-mode="replace" data-ajax-update="#test" href="/Home/Test">test</a>
which, obviously lacks the onclick="Sys.Mvc.AsyncHyperlink.handleClick(...)"
attribute.
Anyone faced similar problem?
That's because you use unobtrusive javascript, which does not require the onclick handler.
Unobtrusive javascript is enabled by default in asp.net mvc 3.
The link should work though.
精彩评论