我正在使用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 ...谢谢
您应该检查图像路径。 –