<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" MasterPageFile="~/Views/Shared/SleisLayout.Master" %> <%-- Edit --%>

Edit a News Item

<% Html.ValidationSummary("Please correct the errors and try again"); %> <% using (Html.BeginForm()) { %>

<%: Html.LabelFor(x=>x.Title,"News Title:") %> <%: Html.TextBoxFor(x => x.Title, new { @class = "text-input wide-input required", @maxlength = "50" })%> <%: Html.ValidationMessageFor(x=>x.Title) %>

<%: Html.LabelFor(x => x.Text, "News Content:")%> <%:Html.TextAreaFor(x=>x.Text, new{ @class="text-input textarea, required", @rows="10" }) %> <%: Html.ValidationMessageFor(x=>x.Text) %>

<%: Html.LabelFor(x => x.StartDate, "Effective Date:")%> <%: Html.TextBox("StartDate", HtmlUtility.Format(Model.StartDate), new { @class = "text-input medium-input showAsCal required", @maxlength = "10" })%> <%: Html.ValidationMessageFor(x=>x.StartDate, Constants.FormatErrorMessage)%>

<%: Html.LabelFor(x => x.EndDate, "Ending Date:")%> <%: Html.TextBox("EndDate", HtmlUtility.Format(Model.EndDate), new { @class = "text-input medium-input showAsCal", @maxlength = "10" })%> <%: Html.ValidationMessageFor(x => x.EndDate, Constants.FormatErrorMessage) %>

<%: Html.ActionLink("Cancel", "List", "NewsItem", null, new { @class = "cancelButton" })%> <% if (Model != null) { %> <%: Html.ActionLink("Delete", "Delete", new { id = Model.Id }, new { @class = "deleteButton" })%> <%} %>

<%} %>