Asp.NET Core post form from a layout page to a child page
I an new to ASP.NET CORE Razor Pages & MVC, but very familiar with WebForms (so bear with me). I am trying to create a web site using Razor Pages. I have a layout pay that contains the main navbar and footer. In the navbar has simple search controls where a user can enter a 2 values, and click the search button. I have a child page that handles the search (and also has more expanded search functionality)
How can go about passing the values from the layout page controls and redirecting them to the child page. I have searched around and come up with this, but it doesn't seem to be working? Am i way off base?
Given a controller class RemoteSearch with Action "Search" The first paramter to BeginForm should be "Search". If the method is Index, this should be "Index".
If you are submitting to Controller "Agent" Action "Search" then do it like
BeginForm("Search", "Agent" ....