I am trying to use Url.Action to create the correct HTTP URL based on the action of the controller as follows: $.post('@Html.Raw(Url.Action("Delete", new { id = "1" }))')
However, it does not work as expected. The actual url is fired (got it from dev tools) http://localhost:60223/CordBlood/@Html.Raw(Url.Action(%22Delete%22,%20new%20%7B%20id%20=%20%224%22%20%7D))
While I need something like this: http://localhost:60223/CordBlood/Delete/1
What am I doing wrong here?
gprasant
source share