我试图将图像的Uri传递给UriImageSource.Uri,但是在Uri字符串中包含%20,它被错误地转换为空白
即
http://domain.co.uk/Category%20Name/Products/Product-image.jpg当这个被解析到我的函数
UriImageSource UriImageSource = new UriImageSource();
UriBuilder Builder = new UriBuilder(productURL);
UriImageSource.Uri = Builder.Uri;
return UriImageSource;将UriImageSource.Uri转换为
http://domain.co.uk/Category Name/Products/Product-image.jpg这将在我的应用程序中抛出一个错误,因为URL包含%20而不是空白.任何帮助都是非常感谢的。谢谢!
发布于 2016-12-05 22:51:11
您可以使用HttpUtility类从System.Web中编译/解码url
有关这个类的更多信息,您可以在这里找到HttpUtility文档
https://stackoverflow.com/questions/40979480
复制相似问题