我正在使用asp.net圖片標籤,我想從PIC服務器動態路徑,我使用中繼器控制,這和我的aspx.cs頁面代碼圖像的動態路徑不工作..在ASP.Net?
protected void Repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
string hotelid = ((Label)e.Item.FindControl("lblhotelid")).Text.ToString();
dr = d.FetchDataReader("select hotelname,stateid,cityid from hotelmaster");
if (dr.Read())
{
((Label)e.Item.FindControl("lblhotelname")).Text = dr["hotelName"].ToString();
string stateid, cityid;
stateid = dr["stateid"].ToString();
cityid = dr["Cityid"].ToString();
Image img = (Image)e.Item.FindControl("imgHotels");
img.ImageUrl = "~/http://bindassholidays.info/Photos/HotelPhotos" + stateid + cityid + hotelid + "~\"hotelid.jpeg";
}
}
,但圖像沒有找到。 。請檢查 任何幫助應該是appriciable ...謝謝
您應該檢查圖像路徑。 –