在Tupianxinwen\\XiuGai.aspx中有一个<asp:Image id="Image1" Width="80px" runat="server" Height="80px" ImageUrl='<%#Server.MapPath("..\\..\\UpdateImage").ToString()+"\\"+DataBinder.Eval(Container.DataItem,"ImageName")%> '></asp:Image>控件可是用
Server.Transfer("Tupianxinwen\\XiuGai.aspx")跳转却打不来图片,但网页无错误,能打开。但用
 Response.Redirect("Tupianxinwen\\XiuGai.aspx")却可能打开图片。一切正常!怪了?为什么呢?

解决方案 »

  1.   

    将imageurl换成src
    <asp:Image id="Image1" Width="80px" runat="server" Height="80px" src='<%#Server.MapPath("..\\..\\UpdateImage").ToString()+"\\"+DataBinder.Eval(Container.DataItem,"ImageName")%> '></asp:Image>image&imagebutton的imageurl是取当前的路径的相对路径用Server.Transfer时服务器当前路径未改变,所以会出现路径不对
      

  2.   

    Server.Transfer 是服务端事件
    Response.Redirect 是客户断
      

  3.   

    跟Server.Transfer或Response.Redirect无关;
    在图片上右键-〉显示图片 看看能否显示出来,如果能那么就无伤大雅,过一段时间就好了;
    这个问题即使纯html页面都会有的
      

  4.   

    同意Truly(NULL)的说法,
    Server.Transfer的功能不是跳转,是向当前页面追加内容,所有你的图片要取与当前页的相对路径