ASPNET Core MVC - Form to GET url

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP


ASPNET Core MVC - Form to GET url



Good evening,



I have a simple question that I can't seem to find answer to anywhere.



I have a controller method with HttpGet route set like this:


[HttpGet("tools/browse/{table}/{row}/{offset}")]



My question is simple and I know that a lot of people would be interested in the answer aswell.



How does one use such form:


<form action="/tools/browse/{table}/{row}/{offset}" method="get">
<input type="text" name="table" value="" />
<input type="number" name="row" value="" />
<input type="number" name="offset" value="" />
<input type="submit" />
</form>



..so that {table}, {row} and {offset} contain values from the form itself?



I know that the workaround would be using post or simply parsing the form data within function - but I want the url, so the user can copy it, bookmark it and so on.



Thank you in advance.









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Visual Studio Code: How to configure includePath for better IntelliSense results

Spring cloud config client Could not locate PropertySource

Makefile test if variable is not empty