protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (string.IsNullOrEmpty(Request.Params["CarPicPath"]) == false) ... ...
<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";