<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" MasterPageFile="~/Views/Shared/SleisLayout.Master" %> <%-- Report Attachment Upload --%>
<%-- <%:Html.ActionLink("Back", "List", "ReportAttachment", new { id = Model.ReportId, facilityId = Model.FacilityId }, new { @class = "backButtonNoText argsHolder align-right" })%>--%>

Add Report Attachment

<% Html.ValidationSummary("Please correct the errors and try again"); %> <% using (Html.BeginForm("Upload", "ReportAttachment", FormMethod.Post, new { enctype = "multipart/form-data" })) { %> <%:Html.HiddenFor(x => x.Item.Id)%> <%:Html.HiddenFor(x => x.Item.Attachment.Name)%> <%:Html.HiddenFor(x => x.ReportId)%> <%:Html.HiddenFor(x => x.FacilityId)%> <%:Html.HiddenFor(x => x.Item.Attachment .ReportId)%> <%:Html.HiddenFor(x => x.Item.Attachment.MimeType)%> <%:Html.HiddenFor(x => x.Item.Content)%>

<%:Html.LabelFor(x => x.Item.Attachment.Name, "File:")%> <%--This is a placeholder for creating the file-input box in jQuery which allows us to clear it. --%> <%:Html.ValidationMessageFor(x => x.Item.Attachment.Name)%>

<%:Html.LabelFor(x => x.Item.Attachment.Description, "Descripton:")%> <%:Html.TextBoxFor(x => x.Item.Attachment.Description, new { @class = "text-input wide-input" })%> <%:Html.ValidationMessageFor(x => x.Item.Attachment.Description)%>

<%: Html.ActionLink("Cancel", "List", "ReportAttachment", new { id = Model.ReportId, facilityId = Model.FacilityId }, new { @class = "cancelButton" })%>

<%} %>