I have a URL which which has a query parameter that itself contains a query string with other parameters. E.g:
https://discovery.com/disco.ashx?entityId=www.test.com&return=https://myidp.com/?param1=myvalue
How do I get the value of the nested param1?
I have tried something like this but it doesn’t work:
var returnParam = context.Request.QueryString["return"];
var test = HttpUtility.ParseQueryString(returnParam);
var value = test["param1"];
you can try this –
var u = new Uri(returnParam); var newparams = u.Query;