@model WebApp.Models.UploadModel

@{
    ViewBag.Title = "Загрузка документа";
}

<h2>Загрузить документ</h2>


@using (Html.BeginForm("Upload", "Storage", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
    @Html.ValidationSummary(true, "", new { @class = "text-danger" })
    @Html.AntiForgeryToken()

    @Html.LabelFor(Model => Model.Name)
    @Html.ValidationMessageFor(Model => Model.Name, "", new { @class = "text-danger" })
    <br />
        @Html.EditorFor(Model => Model.Name, new { htmlAttributes = new { @class = "form-control" } })
        <br />
        @Html.TextBox("file", "", new { @class = "file", type = "file" })
        <br />
        <input type="submit" value="Загрузить" class="btn btn-warning" />
        @Html.ActionLink("К списку документов", "Documents",null, new { @class = "btn btn-primary" })
        <p>@ViewBag.Message</p>
}

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
