Progress bar .NET Razor C #

0

Friends I'm doing a program that loads VERY long files, in a database, I already have everything working, but I would like to implement a progress bar while my loading method is running, when I finish my method it will send me to another view. So my question is How to implement the progress bar? and How can I point to a specific ID in razor?

This is my code

@using (Html.BeginForm("CreateFolder", "CreateFolder", FormMethod.Post, new { enctype = "multipart/form-data", @class = "p2" })) {
<label>Elija un banco:</label> @Html.DropDownList("lstBancos", new List
<SelectListItem> { new SelectListItem { Text = "", Value = "" } }, new { required = "required", @class = "form-control" })

  <br />

  <label>Elija una cuenta:</label> @Html.DropDownList("lstlistaCuentas", new List
  <SelectListItem> { new SelectListItem { Text = "", Value = "" } }, new { required = "required", @class = "form-control" })

    <br />
    <label>Agregue un archivo:</label> @Html.TextBox("file", "", new { type = "file", required = "required", accept = "text / plain, .xlsx,.xls,.txt" });
    <br />
    <input type="submit" value="cargar" /> }

    <div style="width:300px">
      <div id="progressbar" style="position:relative; display:none;">
        <span id="progressbarlb" style="position:absolute; left:35%; top:20%;">Cargando ...</span>
      </div>
    </div>

As you see what I intend is to use that progressbarlb to show the progress of my method, when submitting my file, I HIGHLIGHT THAT IT IS ONLY ONE FILE (one very long, but only one ). That would be CreateFolder which is very long and I'm not getting any error from it. Could someone tell me how to do it? and if it's better by js or implement it from C #

    
asked by E.Rawrdríguez.Ophanim 09.08.2018 в 01:52
source

0 answers