C#C
C#3y ago
Messiah

❔ How to properly redirect in Razor Pages?

I'm redirecting w/ variables using:

  1. <a asp-page="Stats" asp-route-qurl="@j">button</a> redirects to /Stats page, also sending a string to the page.
  2. /Stats page calls a 3rd party API using the string
  3. /Stats renders itself using response from 3rd party API
But this is causing me to lose my session tokens. Every page is properly DI'd with downstreamWebApi. Do I have to add some attributes to get .AddDownstreamWebApi() to work with every page, or am I just redirecting wrong?
Was this page helpful?