Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @{
- ViewData["Title"] = "Home Page";
- }
- <div class="text-center">
- <h1 class="display-4">Welcome</h1>
- <p>Please Upload An Excel File.</p>
- <input type="file" name="datafile" style="margin-left: 10px; margin-top:
- 15px; vertical-align: top; font-size:18px; background-color: white; margin-
- left:160px; margin-top:15px; width:250px; height:40px /">
- </div>
- <form method="get" asp-controller="Home" asp-action="Log">
- <div class="form-group">
- <p>Read</p>
- <input type="button" value="Read" />
- </div>
- [HttpGet]
- public IActionResult Log()
- {
- var webRoot = _env.WebRootPath;
- var file = Path.Combine(webRoot, "Output,txt");
- //var lines = System.IO.File.ReadAllText()
- System.IO.File.ReadAllText(file);
- return Content(file);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement