@model WebApplication1.Models.news @{ ViewBag.Title = "Edit"; }

Edit

@using (Html.BeginForm()) { @Html.AntiForgeryToken()

news


@Html.ValidationSummary(true, "", new { @class = "text-danger" }) @Html.HiddenFor(model => model.ID)
@Html.LabelFor(model => model.title, htmlAttributes: new { @class = "control-label col-md-2" })
@Html.EditorFor(model => model.title, new { htmlAttributes = new { @class = "form-control" } }) @Html.ValidationMessageFor(model => model.title, "", new { @class = "text-danger" })
@Html.LabelFor(model => model.image, htmlAttributes: new { @class = "control-label col-md-2" })
@Html.EditorFor(model => model.image, new { htmlAttributes = new { @class = "form-control" } }) @Html.ValidationMessageFor(model => model.image, "", new { @class = "text-danger" })
@Html.LabelFor(model => model.link, htmlAttributes: new { @class = "control-label col-md-2" })
@Html.EditorFor(model => model.link, new { htmlAttributes = new { @class = "form-control" } }) @Html.ValidationMessageFor(model => model.link, "", new { @class = "text-danger" })
@Html.LabelFor(model => model.summary, htmlAttributes: new { @class = "control-label col-md-2" })
@Html.EditorFor(model => model.summary, new { htmlAttributes = new { @class = "form-control" } }) @Html.ValidationMessageFor(model => model.summary, "", new { @class = "text-danger" })
@Html.LabelFor(model => model.cat, htmlAttributes: new { @class = "control-label col-md-2" })
@Html.EditorFor(model => model.cat, new { htmlAttributes = new { @class = "form-control" } }) @Html.ValidationMessageFor(model => model.cat, "", new { @class = "text-danger" })
@Html.LabelFor(model => model.tag, htmlAttributes: new { @class = "control-label col-md-2" })
@Html.EditorFor(model => model.tag, new { htmlAttributes = new { @class = "form-control" } }) @Html.ValidationMessageFor(model => model.tag, "", new { @class = "text-danger" })
@Html.LabelFor(model => model.publishDate, htmlAttributes: new { @class = "control-label col-md-2" })
@Html.EditorFor(model => model.publishDate, new { htmlAttributes = new { @class = "form-control" } }) @Html.ValidationMessageFor(model => model.publishDate, "", new { @class = "text-danger" })
@Html.LabelFor(model => model.userID, htmlAttributes: new { @class = "control-label col-md-2" })
@Html.EditorFor(model => model.userID, new { htmlAttributes = new { @class = "form-control" } }) @Html.ValidationMessageFor(model => model.userID, "", new { @class = "text-danger" })
@Html.LabelFor(model => model.Content, htmlAttributes: new { @class = "control-label col-md-2" })
@Html.EditorFor(model => model.Content, new { htmlAttributes = new { @class = "form-control" } }) @Html.ValidationMessageFor(model => model.Content, "", new { @class = "text-danger" })
@Html.LabelFor(model => model.views, htmlAttributes: new { @class = "control-label col-md-2" })
@Html.EditorFor(model => model.views, new { htmlAttributes = new { @class = "form-control" } }) @Html.ValidationMessageFor(model => model.views, "", new { @class = "text-danger" })
}
@Html.ActionLink("Back to List", "Index")