简体   繁体   English

Sharepoint Webpart加载在页面加载时异步

[英]Sharepoint Webpart load asynchronous on page load

I'm just having a webpart on a page which consumes webservice of a RSS feed, converting into datatable displaying with my own design, because of which the whole page load is slowed down. 我只是在一个 Web部件上使用了RSS提要的Web服务的页面上的Web部件,然后转换为以我自己的设计显示的数据表,因此, 整个页面的加载速度降低了。

What i wanted to do is to let the other webparts render and this webpart can take it's own time to load? 我想做的是让其他Webpart渲染,而这个Webpart可以花自己的时间来加载?

Does anyone come across this kind of situation where the webpart on page load is asynchronously loaded? 是否有人遇到过这样的情况,即页面加载Web部件是异步加载的?

Please help me on this. 请帮我。

Thanks in advance 提前致谢

A WebPart cannot be loaded asynchronously as it is delivered within the page rendering process (in the end a web browser only understands HTML). WebPart不能在页面呈现过程中交付,因此不能异步加载(最终Web浏览器只能理解HTML)。

What you can do is to load the content of the WebPart asynchronously by using Javascript. 您可以做的是使用Java脚本异步加载WebPart的内容 So you could get your RSS feed via Javascript and a Webservice and load that after everything else has finished loading on the page. 因此,您可以通过Javascript和Web服务获取RSS feed,并在页面上的其他所有内容加载完毕后再进行加载。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM