❔ Razor pages redirect
How do you make a form redirect to a page, and pass a value to it?
My entire application is routed as such: "www.site.com/thepage/thequery". How do I get data from the form and pass to the page it, with the query?
I can't get it to work without with the url formatted like that
6 Replies
POST
request from a given page goes back to the same page and triggers the OnPost
/OnPostAsync
method
That's how forms are sentI managed to redirect, but I couldn't pass data along with it
whatever I tried, always passes like site.com/thepage?thequery=value
How are you redirecting it?
Use
RedirectToPage()
insteadWas this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.