ASP.Net - 图像加载问题 [英] ASP.Net - Image Loading Problems

查看:58
本文介绍了ASP.Net - 图像加载问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个asp.net页面,该页面上只有一个图像。当页面加载时,页面中的其余内容仅在图像加载完成后才可见。



我可以在图像完全加载之前完全加载页面吗? />








[orig。标题]

我有一个asp.net页面,该页面中有一个图像。加载后加入图像后,页面中的其余内容可见。

I have one asp.net page with only one image on that page. When the page loads the rest of the contents in the page become visible only after the image finishes loading.

Can I load the page completely before image loads completely?




[orig. title]
I have one asp.net page , One image is there in that page . When loading After laoding the image , rest of the contents in page visible.

推荐答案

如果您的意思是在客户端加载页面之后,那么您可以使用这个ASP.NET Ajax代码:(它要求你在页面上有一个 asp:ScriptManager 来启用AJAX)

If you mean after page is loaded on the client, then you can use this ASP.NET Ajax code: (It requires that you have a asp:ScriptManager on the page to enable AJAX)
<script type="text/javascript">
var prm = Sys.WebForms.PageRequestManager.getInstance(); 
if(prm) prm.add_pageLoaded( PageLoadedEventHandler );  

function PageLoadedEventHandler() 
{   
  // Do your stuff 
}
</script>


这篇关于ASP.Net - 图像加载问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆