這是我的圖片URL的Response.Write - 如何顯示圖片
string fileUrl = file.Link;
我想將此上Response.Write.How辦呢?
Response.Write("<img src='" & fileUrl& "'/>")
上面的代碼我試過。但它不起作用。
這是我的圖片URL的Response.Write - 如何顯示圖片
string fileUrl = file.Link;
我想將此上Response.Write.How辦呢?
Response.Write("<img src='" & fileUrl& "'/>")
上面的代碼我試過。但它不起作用。
它是& ...... 它用+替換& ..
Response.Write("<img src='" + fileUrl+ "'/>")
讓filePath
包含虛擬地址和所示
string filePath = "http://localhost:2053/Styles/Images/myPersonalImage.jpg"
Response.Write("<img src='" & filePath & "'/>");
圖像不在本地主機上。我從外部網站上獲取它。我成功地將圖像存儲在本地機器上。但我需要在我的項目中顯示 – 2014-11-21 11:24:55
您需要使用使用Server.Mappath。
string fileUrl = Server.MapPath(file.Link);
Response.Write應該包含什麼內容? – 2014-11-21 11:32:29
什麼是屬性'Link'正常工作? – 2014-11-21 11:28:04
@BlackFrog我從外部站點獲取圖像,file.Link從外部Site.I返回ImageLink成功將圖像存儲在本地計算機上。但我需要在我的項目中顯示 – 2014-11-21 11:31:48