I have found the answer to the question "how to execute POST method using hyperlink (actionlink) instead of button" in this topic.
I have used form's submit method in this way - looks straightforward:
@foreach (var item in Model)
{
using (Html.BeginForm("Delete", "Area", new { id = item.id }, FormMethod.Post))
{
<tr>
...
<td>
<a href="#" onclick="$('#sbmt').trigger('click'); return false">Delete</a>
<input id="sbmt" type="submit" style="visibility: hidden" />
</td>
</tr>
}
}
Typical declaration without button declaration
<a href="#" onclick="$(this).parents('form').submit();">Delete</a>
will not work.
The questions are:
1/ Is it possible to do the same operation but without hiding the button? I mean I don't want to use (and hide) button in my code at all.
2/ What are pros and cons of the solution listed above?