I'm trying out different ways to do a form with a confirm. I have the following in form as well as just a hyperlink. The hyperlink below is displaying the glyphicon correctly but the submit button inside the form is just displaying as "submit" in a gray button. Does the CSS need to be different in the submit button vs a hyperlink?
<div class="text-center">
@using (Html.BeginForm("Delete", "Patrol", new { id = item.MemberId }))
{
@Html.AntiForgeryToken()
<input type="submit" class="glyphicon glyphicon-trash" onclick="return confirm('Are you sure you want to remove this record?')" />
}
<a href="@Url.Action("Delete", new {id = item.MemberId})" onclick="return confirm('Are you sure you want to remove this record?')"><span class="glyphicon glyphicon-trash"></span></a>
</div>
See Question&Answers more detail:os