问题描述
亲爱的所有人,
我在ASP.NET中使用"img"控件来显示图像.我为imageurl分配了来自数据库的图像文件路径,如下所示:
Dear All,
I am using ''img'' control in ASP.NET to display images. I am assigning the imageurl with the image file path coming from database as below:
imgMain.ImageUrl = ImagePath;
该程序使用Internet Explorer运行并从URL加载图像.很好.
但是,当要与mozilla Firefox一起运行时,图像不会显示在图像面板"中.请帮帮我.
代码是:
This program run and load images from URL with Internet Explorer. Fine.
But when want to run with mozilla Firefox, image is not shown in Image Panel. Please help me.
Code is:
//Funtion in Client side as like below:
function fnSetImage(filepath)
{
document.getElementById('<%=imgMain.ClientID%>').src=filepath;
return false;
}
推荐答案
//Funtion in Client side as like below:
function fnSetImage(filepath)
{
document.getElementById('<%=imgMain.ClientID%>').src= '../' + filepath;
return false;
}
如有任何疑问,请让我知道.
如果有帮助,请提供"投票",如果这是正确的答案,请提供"接受答案".:rose:
谢谢,
Imdadhusen
Please do let me know, if you have any doubt.
Please provide "Vote" if this would be helpful, and make "Accept Answer" if this would be correct answer.:rose:
Thanks,
Imdadhusen
这篇关于无法在Mozilla Firefox中显示图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!