@page @model IndexModel @{ ViewData["Title"] = "Home page"; } <div class="container-fluid" "> <div class="panel panel-default" id="panel1"> <form id="form1" action="/api/Values" method="post" enctype="multipart/form-data"> <label for="myfile">Select an file</label> <input id="btn_Upload" type="file" onchange="this.form.submit();" > </form> </div> </div>
namespace WebApplication2.Controllers { [Route("api/[controller]")] [ApiController] public class ValuesController : ControllerBase { [HttpGet] public IEnumerable<string> Get() { return new string[] { "Values 1", "Values 2" }; } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)