2
Hello, I have a question in which I already researched a lot and did not get any concrete answer. I am beginner in C# and ASP.NET, forgive me for ignorance.
I have a project in ASP.NET Core MVC.
On it I have Page A and Page B.
On Page A I have an "Add Page B Item" button, on which when clicked, I need you to go to Page B by pressing the ID of Page A.
I wonder if there is any way to do this without using JS.
the request for page B will be GET or POST ? if it is GET, pass the parameter in the URL,
Controller/Action/{Parametros}
if it’s by post, you can use a form...etc...– Rovann Linhalis
It will be a POST, it happens that this button is already inside a form, can I have one form inside the other? I thought of suddenly do using Redirecttoaction, but it is GET, and as it is an ID, it is easy for the user to manipulate in the URL
– Leonardo Larocca
I don’t know if you can have one form inside the other, but I don’t know what would be the use of that, since it will leave the page...
– Rovann Linhalis
It would basically pass the parameter to the controller and the controller redirect to the B page passing the ID of the A by a Viewbag if you want I can mount an ex as a response to an ex
– Edenilson Bila