c# - 更新图像而不闪烁 ASP.NET C#

标签 c# asp.net image flicker

我正在编写一个网站,该网站的页面必须显示图像。此图像是由 HttpHandler 使用查询字符串命令创建的,我怎样才能使它在没有任何闪烁的情况下工作?

提前致谢,如果您需要一些代码,我很乐意分享!

最佳答案

您可以使用 2 个 UpdatePanel 并在每次“重新加载”后切换它们:

Load Frame1 into Panel1 and hide Panel2 at Postback/Pageload
Load Frame2 into Panel2 per AJAX and after the Image is loaded show Panel2 and hide Panel1
Load Frame3 into Panel1 per AJAX and after the Image is loaded show Panel1 and hide Panel2
aso....

然后您甚至可以使用 JS 从 Panel1->Panel2 平滑淡入淡出(参见 HERE 或使用 jQuery fadeIn()fadeOut() 更容易)。

关于c# - 更新图像而不闪烁 ASP.NET C#,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6648517/

相关文章:

c# - 绘制阴影

c# - 如何加快在 ASP.NET 中调用命令行工具的循环?

处于暂停状态的图像未加载到其他图像上

c - 使用 Pure C 显示 PGM 图像 (p5) 的直方图像素值,无需任何图像处理库

c# - 如何使用 ExpressionMediaPlayer 控件在 Silverlight 中从 Web 服务器流式传输视频?

c# - 为什么在为 Silverlight 5 应用程序添加编码 UI 支持时 System.Core 加载失败?

c# - 每个配置文件只允许一个 configSections 元素,如果存在,则必须是根配置元素的第一个子元素

具有多个子目录的文件的 ASP.NET MVC 路由

java - 根据图像修改背景颜色(主题)

c# - 如何在执行流操作时获得更好的粒度?