Hello everyone please let me know this is my url
localhost:11111/Id/A/Lo?ReturnUrl=/Id/Ac/Link?&Token=Cie7s2ZTz5g/SlCF+EDuia3C3I3nYXRKTS1IZ2Kq0Ot9NFlkkslI25+cnKKFkS29
How to get Token value
Hello everyone please let me know this is my url
localhost:11111/Id/A/Lo?ReturnUrl=/Id/Ac/Link?&Token=Cie7s2ZTz5g/SlCF+EDuia3C3I3nYXRKTS1IZ2Kq0Ot9NFlkkslI25+cnKKFkS29
How to get Token value
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jignesh KumarPosted Jan 13, 2023, 8:38 AM
Hello Anukesh,
You can get using IHttpContextAccessor in .net core. just inject IHttpContextAccessor interface and use below code you will get query string details
Amit MohantyPosted Jan 13, 2023, 8:01 AM
Try using UrlEncode to encode your query strings.
Naimish MakwanaPosted Jan 13, 2023, 6:37 AM
Hello Ankush, please use below code. It will not remove + sing.
Thanks.
Sachin SinghPosted Jan 13, 2023, 5:30 AM
If nothing works then you can use split
Ankush VermaPosted Jan 13, 2023, 5:29 AM
I have use this but remove + sign from this value Token=Cie7s2ZTz5g/SlCF+EDuia3C3I3nYXRKTS1IZ2Kq0Ot9NFlkkslI25+cnKKFkS29"
string token = HttpUtility.ParseQueryString(myUri.Query).Get("Token");
Naimish MakwanaPosted Jan 13, 2023, 5:23 AM
User below solution.
Thanks.