if your js code inside view
$.ajax({
type: 'post',
url: "@Url.Action("ClearData","Home")",
success: function () {
}
});
this is work
when js code is an separate (external file)
@Url.Action("ClearData","Home") is not work ,
this case you have to write total url or folder path