I have written following jquery in my partial view:
$.ajax({
type: \"POST\",
url: \'@Url.Action(\"PostActionName\", \"ControllerName\")\'
function functionName(var1, var2) {var link = '@Url.Action("MethodName", "Controller", new { id = "-1", name = "-2" })';
link = link.replace("-1", var1);
link = link.replace("-2", var2);}
before, replace:
html += " Name Button"