jqueryや外部ライブラリではなく純粋なjavascriptを使用して、MVCでコントローラーを呼び出すにはどうすればよいですか
コントローラ
public class SomeController : Controller
{
public ActionResult SomeMethod(string key, string value)
{
return this.Json(new { success = true });
}
}
JQuery
$(function () {
$.post('/SomeController /SomeMethod',
{ key : "TestKey", value : 'Test' }, function (data)
{
alert("Success " + data.success);
});
});
javascriptで上記のjqueryと同等の構文は何ですか