当前位置:编程学习 > C#/ASP.NET >>

求助!updatepanel无法自动更新图片

这个图片是从C#里直接存出来的统计图,隔会儿更新一次,文件名不会变
现在这样写出来只有手动F5刷新图片才会有变化,无法自动刷新

<asp:UpdatePanel ID="UpdatePanel6" runat="server">
     <Triggers>
     <asp:AsyncPostBackTrigger controlid="zedgraph_1" EventName="Tick" />
     </Triggers>
     <ContentTemplate>
         <asp:Image ID="Image2" runat="server" Height="165px" 
            ImageUrl="http://localhost/socketcontrol/ZedGraphImages/graph.png" 
            Width="362px" />
     </ContentTemplate>

     </asp:UpdatePanel>


    
protected void zedgraph_1_Tick(object sender, EventArgs e)
    {
        this.Image2.ImageUrl = "http://localhost/socketcontrol/ZedGraphImages/graph.png";
    }
--------------------编程问答-------------------- 用js呗,让其每隔几秒刷新一次
说白了就是每隔几秒使用window.href="本身页面"; --------------------编程问答-------------------- protected void zedgraph_1_Tick(object sender, EventArgs e)
    {
        this.Image2.ImageUrl = "http://localhost/socketcontrol/ZedGraphImages/graph.png";
UpdatePanel6.update();
    }

这样? --------------------编程问答-------------------- 你不用Timer控件,那来自动更新??? --------------------编程问答-------------------- UpdatePanel + Timer --------------------编程问答-------------------- 想要锻炼自己的话一般不要用控件 效果一般还是自己写的号 
补充:.NET技术 ,  ASP.NET
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,