From 94a58b988a34d7590efdd41b4d7337e519be1720 Mon Sep 17 00:00:00 2001 From: linuxct Date: Tue, 14 Jul 2020 12:46:11 +0200 Subject: [PATCH] Fix markup --- OD.WebApplication/Models/HomeViewModel.cs | 2 ++ OD.WebApplication/Views/Home/Index.cshtml | 10 +++------- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/OD.WebApplication/Models/HomeViewModel.cs b/OD.WebApplication/Models/HomeViewModel.cs index 7bf6143..d0a6ec5 100644 --- a/OD.WebApplication/Models/HomeViewModel.cs +++ b/OD.WebApplication/Models/HomeViewModel.cs @@ -1,3 +1,4 @@ +using System.ComponentModel.DataAnnotations; using System.IO; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.FileProviders; @@ -6,6 +7,7 @@ namespace OD.WebApplication.Models { public class HomeViewModel { + [Required] public IFormFile FileAttach { get; set; } } } \ No newline at end of file diff --git a/OD.WebApplication/Views/Home/Index.cshtml b/OD.WebApplication/Views/Home/Index.cshtml index 08b6ffb..67dd18c 100644 --- a/OD.WebApplication/Views/Home/Index.cshtml +++ b/OD.WebApplication/Views/Home/Index.cshtml @@ -5,16 +5,12 @@ }
-

Escoge el CSV a parsear

-
@using (Html.BeginForm("UploadCSV", "Home", FormMethod.Post, new {id = "loginForm", enctype = "multipart/form-data"})) { @Html.AntiForgeryToken() -
- - - -
+
+ +
}