In JavaScript
I encode part of uri
:
var imageName = "test space in name of image.jpg"
var sentWithAjaxVariable = encodeURIComponent(imageName);
//sentWithAjaxVariable in console is "test%20space%20in%20name%20of%20image.jpeg"
On server side, in handler I want to decode this variable like this:
var imageName = context.Request.Params["sentWithAjaxVariable"];
var decodedImageName = context.Server.UrlDecode(imageName);
//decodedImageName in watch => "test%20space%20in%20name%20of%20image.jpeg"
why not decode?