Good afternoon,
I am working on a simple form in ASP.NET Core 3.1, and I am struggling to understand beginform.
I have a search box on one page (in this case /Index), and using GET (a requirement) when someone types their search in and presses the search button, the Action needs to go off to another page (in this case /Listing )
In the razor form page, if I use : -
@using (Html.BeginForm("Listing", "", FormMethod.Get))
{
}
..... but I get this HTML created : -
<form action="/?action=Listing" method="get">
</form>
What I would expect to see is : -
<form method="get" action="/Listing">
</form>
So what am I doing wrong with my BeginForm above to be getting the wrong HTML created for the tag please?
I have tried numerous answers found elsewhere but they are for MVC and I am using Razor pages only not MVC.
Thank you in adavnce if you can help?
Harry