FileUpload1.Attributes.Add("onchange", @"document.getElementById('imgPhoto').src=document.getElementById('FileUpload1').value.unescape();");
在VS2005里是正常的,到了VS2008后显示出来的文件名的空格都变成了20%,请教怎么修改上面的js把%20变或空格
------解决方案--------------------编码用escape(string)
解码用unescape(string)
------解决方案--------------------C# code
FileUpload1.Attributes.Add("onchange", @"document.getElementById('imgPhoto').src=unescape(document.getElementById('FileUpload1').value);");
------解决方案--------------------
C# code
Microsoft.JScript.GlobalObject.unescape(object @string)
------解决方案--------------------
urlencode
urldecode
-->
空格变%20
C# code
FileUpload1.Attributes.Add("onchange", @"document.getElementById('imgPhoto').src=document.getElementById('FileUpload1').value.unescape();");
在VS2005里是正常的,到了VS2008后显示出来的文件名的空格都变成了20%,请教怎么修改上面的js把%20变或空格
------解决方案--------------------编码用escape(string)
解码用unescape(string)
------解决方案--------------------C# code
FileUpload1.Attributes.Add("onchange", @"document.getElementById('imgPhoto').src=unescape(document.getElementById('FileUpload1').value);");
------解决方案--------------------
C# code
Microsoft.JScript.GlobalObject.unescape(object @string)
------解决方案--------------------
urlencode
urldecode