@Html.BeginForm Displaying “System.Web.Mvc.Html.MvcForm” on Page

I have a razor view that I added a delete button to inside of an 'if' statement and when the view is rendered in the browser it is displaying "System.Web.Mvc.Html.MvcForm" next to the delete button.

How do I get rid of it?

Here is the code:

<div id="deletestatusupdate">
    @if (update.User.UserName.Equals(User.Identity.Name, StringComparison.OrdinalIgnoreCase))
    {
        @Html.BeginForm("deleteupdate", "home")
        @Html.Hidden("returnUrl", Request.Url.ToString())
        <button name="id" value="@update.StatusUpdateId">Delete</button>
    }
</div>

Here is how it shows up in the rendered Razor View:

System.Web.Mvc.Html.MvcForm [Delete Button]

pretend that [delete button] is a an actual button, didn't feel like taking a screen shot.

Thank you for your help.

95
задан Ivan Chaer 25 March 2017 в 17:28
поделиться