© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4y ago•
1 reply
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>
<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
downstreamWebApi
. Do I have to add some attributes to get
.AddDownstreamWebApi()
.AddDownstreamWebApi()
to work with every page, or am I just redirecting wrong?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

❔ Razor pages redirect
C#CC# / help
4y ago
❔ Razor pages view
C#CC# / help
4y ago
MVC vs Razor Pages
C#CC# / help
13mo ago
Razor Pages Authentication issues
C#CC# / help
15mo ago