2012-07-06 70 views
0

ASP.NET应用程序图片src firefox未显示,绝对路径

我对显示图像有些混淆。加载img时IE正在全面运行。 Firefox不会在生产服务器上显示图像。

生成的图像网址是服务器:

\chartings\charts\temp/generatedchart_img.jpg 

我注意到,当我运行在本地主机上发布翻转src网址:

/chartings/charts/temp\generatedchart_img.jpg 

任何意见极大的赞赏。 感谢

回答

2

我认为该URL应该只有正斜杠:

/chartings/charts/temp/generatedchart_img.jpg 
+0

我认为,当Firefox发现\它认为那是FILNAME的一部分,而不是一个文件夹断,因此查找文件'temp \ generatedchart_img.jpg'文件夹内'/图表/图表/' – 2012-07-06 10:05:35

+0

感谢您的答案,我的网址是从后面的C#代码生成的。 'this.txtChartImageFilename.Value = this.chartings + @“\”+ csiChart.FileManager.FileName +“.jpg”;'where this.chartings i s'/chartings/charts/temp'。为什么它在IE中工作?它会转换反斜杠吗? – stuggyg 2012-07-06 11:02:24

+0

我不知道为什么IE的剂量是什么剂量......但在你的代码中,你正在添加一个'''第一步将改变'this.txtChartImageFilename.Value = this.chartings + @“\”+ csiChart.FileManager。 FileName +“.jpg”;'to this.txtChartImageFilename.Value = this.chartings + @“/”+ csiChart.FileManager.FileName +“.jpg”;' – 2012-07-06 11:18:21