Hello Folks
I'm trying to call a controller with ajax and it keeps on failing. Anybody can help? Here is the code
Controller Code
public class JumbotronConversionBlockController : BlockController<JumbotronConversionBlock>
{
....
[HttpPost]
public ActionResult Convert(string a)
{
return Json("Hello its working!");
}
....
Html Code
...
function clickSubmit() {
$.ajax({
type: "POST",
url: '@Url.Action("Convert", "JumbotronConversionBlockController")',
contentType: "application/json; charset=utf-8",
data: { a: "testing" },
dataType: "json",
success: function() { alert('Success'); },
error: function () { alert('Failed'); }
});
}
...
ERROR
- Request URL:https://local.me.com/rendering/JumbotronConversionBlockController/Convert
- Request Method:POST
- Status Code:404
- Remote Address:127.0.0.1:443