AjaxOptions ajaxMainArea = new AjaxOptions() { HttpMethod = "Post", UpdateTargetId = "main_area" };
@Ajax.ActionLink("new game", "Game", ajaxMainArea)
I need click in javascript.
function newgame(cost) {
//here I need call ajax method
}
How to do this?
and in your script, bind the functionality to your element.
Assuming you have jQuery loaded in your page.
If I am doing some custom stuff with links like that, i will just use the normal
ActionLinkHTML helper and bind the functionality to that like thisand the Script is