I have a list of users that i will add the ability to remove users from but with what i currently have - the form is not doing what it is supposed to do: that is to trigger the delete method from the api controller. I am not getting any errors on the page nor in the console and not sure what i could be doing wrong:
<form data-submit-button="#userRemoveSubmit" id="userRemoveForm" action="/api/UserRemove/" class="ajax" method="delete" data-overview-id="@ViewBag.OverViewID" data-bind="attr: { 'data-user-id': ID(), 'data-type-id': TypeId() }">
.......
</form>
<a id="userRemoveSubmit" title="Remove User"><b>REMOVE</b></a>
Controller:
public HttpResponseMessage Delete(TypesList typeInfo)
{
........
}
TypeList Model:
public class TypesList
{
public int UserId { get; set; }
public int TypeId { get; set; }
public int? OverViewId { get; set; }
}
How can i properly make them all connect together so that when i click on remove it triggers the delete method in the controller?