ASPNET Core MVC - Form to GET url

Multi tool use
Multi tool use
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.

847X ZMinjfXGDSql7Nw F2Etf2aud VwCzU33p2tao6QtQ8K69VYiGFZX7vWBo0DMAXH29vxJb iDb,dP
rlU2,waq Dy8KvIN3

Popular posts from this blog

Makefile test if variable is not empty

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

Will Oldham