Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Localization language change clears QueryString #742

Closed
zvasilius opened this issue Oct 21, 2020 · 1 comment
Closed

Localization language change clears QueryString #742

zvasilius opened this issue Oct 21, 2020 · 1 comment
Assignees

Comments

@zvasilius
Copy link

I use some query params for user registration or other purposes:
http://localhost:5000/Controller/Action?queryParam=value

After user changed localization language to different, SelectLanguage.cshtml posts
var returnUrl = string.IsNullOrEmpty(Context.Request.Path) ? "/" : $"{Context.Request.Path.Value}";
back, page will be re-rendered, but without query params:
http://localhost:5000/Controller/Action

Can be easy fixed by changing SelectLanguage.cshtml to this one:
var returnUrl = string.IsNullOrEmpty(Context.Request.Path) ? "/" : $"{Context.Request.Path.Value}{Context.Request.QueryString}";

I can create PR with fix, just not sure if it's good idea.

@skoruba
Copy link
Owner

skoruba commented Oct 26, 2020

@zvasilius - thank you for reporting this issue, for sure, please you can make a PR. 👍

This was referenced Oct 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants