REVISION
I want add a onclick to a element that handles a Ajax request, not just a route-redirect.
I have these options for a route-url.
Html.ActionLink(params)
Url.RouteUrl(params) 'returns JUST ActionUrl
So I can go like
<div onclick="javascript:location.href('<%=Url.RouteUrl(params)%>')"></div>
But how do I generate the following??
<div onclick="Sys.Mvc.AsyncHyperlink.handleClick(this, new Sys.UI.DomEvent(event), { insertionMode: Sys.Mvc.InsertionMode.replace, updateTargetId: 'WorkorderDetails' });"></div>
It turns out that it is not possible. The Sys.Mvc.AsyncHyperlink.handleClick() function relies on the anchor tag to function correctly. The href specified in the anchor is used to determine which service is called on the server.
I ended up creating a Ajax.ActionLink() and making it invisible (display:none). I know invoke the click using Javascript. jQuery actually (normal invoke: link.click() does not work properly!):