I am opening a page from my javascript and passing variable to it like below
<script type="text/javascript">
function myFunction(what) {
var valu = what.value;
var w = window.open("playaudio.aspx?" + what.value);
return false;
}
Now on my playaudio.aspx i am doing this to decode back the %2f and %3f etc into / and ?
string FilePath = HttpUtility.HtmlDecode(Request.QueryString.ToString());
but the problem is that the string FilePath remains unchanged . Any advice on how to change the %2f into / .
That’s because URLs are not HTML encoded.
You need
UrlDecode.