图像路径中的特殊字符c# [英] special characters in Image path c#
本文介绍了图像路径中的特殊字符c#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
hi
当我将图像上传到服务器并添加到数据库的路径时,我注意到如果图像名称包含任何特殊字符,则为
,图像不显示在网格视图图像或asp页面中的图像工具
示例:A&W.jpg
plz帮帮我:)
hi
when I upload my image to server and add the path to database , I notice that
if the image name contain any special char , the image doesn't display on grid view images or image tool in asp page
example : A&W.jpg
plz help me :)
推荐答案
你可以试试看看在此 [ ^ ]。
我认为浏览器在&符后面查找参数,你必须用转义序列转换URL像%20。在Google上搜索,写上Hello之类的内容,然后写上C#,你就可以看到'#'用序列'%23'编码。
希望这会有所帮助。
LG
Hi,
You can try to have a look at this[^].
I think that the browser looks for parameters after the ampersand, you have to convert the URL with escape sequences like %20. Make a search on Google, write something like 'Hello' and then write 'C#' and you can see that the '#' is coded with the sequence '%23'.
Hope this helps.
LG
这篇关于图像路径中的特殊字符c#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文