<asp:Image ID="Image1" runat="server"/> protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
if (string.IsNullOrEmpty(Request.Params["CarPicPath"]) == false)
{
string CarPicPath = Request.Params["CarPicPath"];
Image1.ImageUrl = CarPicPath;
}
}
} 避免图资料405,可以用图片控件来显示后缀路径,不需要域名就不会出现jpg静态资源访问错误
CarPicPath = "/updload/img/20xxxxxx/xxxxxxx.jpg";