SHARE
TWEET

Untitled

a guest Aug 19th, 2019 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @{
  2.  ViewData["Title"] = "Home Page";
  3.  }
  4.  
  5.  <div class="text-center">
  6.     <h1 class="display-4">Welcome</h1>
  7.  <p>Please Upload An Excel File.</p>
  8. <input type="file" name="datafile" style="margin-left: 10px; margin-top:
  9.  15px; vertical-align: top; font-size:18px; background-color: white; margin-
  10.  left:160px; margin-top:15px; width:250px; height:40px /">
  11.  </div>
  12.  <form method="get" asp-controller="Home" asp-action="Log">
  13. <div class="form-group">
  14.     <p>Read</p>
  15.     <input type="button" value="Read" />
  16. </div>
  17.      
  18. [HttpGet]
  19.     public IActionResult Log()
  20.     {
  21.         var webRoot = _env.WebRootPath;
  22.         var file = Path.Combine(webRoot, "Output,txt");
  23.         //var lines = System.IO.File.ReadAllText()
  24.         System.IO.File.ReadAllText(file);
  25.  
  26.         return Content(file);
  27.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top