@model boilerplate.Controllers.PanelController.AddNewsViewModel @{ ViewBag.Title = Model.News.News_ID == 0 ? "افزودن خبر جدید" : "ویرایش خبر"; Layout = "~/Views/_PanelSideBar.cshtml"; } @section Heads { }

@ViewBag.Title

@using (Html.BeginForm("AddNews", "Panel", FormMethod.Post, new { enctype = "multipart/form-data" })) { @Html.AntiForgeryToken() @Html.HiddenFor(model => model.News.News_ID) @Html.HiddenFor(model => model.News.News_IMG) if (!ViewData.ModelState.IsValid) {
@Html.ValidationSummary(false)
}
@Html.EditorFor(model => model.News.News_Title, new { htmlAttributes = new { @class = "form-control" } })
@Html.TextAreaFor(model => model.News.News_Summary, new { @class = "form-control", rows = 3 })
@Html.TextAreaFor(model => model.News.News_Description, new { @class = "form-control", id = "newsDescriptionEditor" })
@if (!string.IsNullOrEmpty(Model.News.News_IMG)) {
تصویر فعلی:
}
}
@section Script { }