asp:UpdatePanel中的asp:TreeView-问题-页面性能不佳 [英] asp:TreeView in asp:UpdatePanel - problem - Bad page performance

查看:80
本文介绍了asp:UpdatePanel中的asp:TreeView-问题-页面性能不佳的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好!!!!
我在asp:UpdatePanel中遇到asp:TreeView问题
你能告诉我该怎么办吗?

我的Web项目中有几个updatepanels,它们全部声明为:
…UpdateMode ="Conditional" ChildrenAsTriggers ="false"…

当我将一个as :: treeview控件放到一个updatepanel中时,它会使整个页面变慢,变慢.

是的,treeview的内容不是很小,我使用递归来填充它,但是我只在page_load上执行一次:if(!Page.IsPostBack){FillTreeView(…); }

当我不调用FillTreeView()方法时,即不使用TreeView时,一切正常.我的页面中有一个搜索部分,是在另一个UpdatePanel中实现的,它的运行速度非常快,最大速度为12-30 Kb/s,但是在TreeView负载下,它可以达到250-400 Kb/s.

实际上,在updatepanel中实现的树视图会限制我的网页,每次执行时都会进行全页回发,即使我根本不触摸树视图,也对页面进行任何形式的操作-当我使用搜索时,这绝对是与它无关,没有以任何方式未连接到树视图.

我亲爱的朋友,同事,程序员,请通过我的有益和有用的建议来帮助我,谢谢!!!

Hi everybody!!!
I have a problem with asp:TreeView in asp:UpdatePanel
Would you please tell me what to do ?

I have several updatepanels in my web project, and all of them declared as:
… UpdateMode="Conditional" ChildrenAsTriggers="false" …

When I put an asp:treeview control into an updatepanel it makes the whole page become slower, much slower.

Yes the treeview content is not very small, and I use recursion for filling it, but I do it on the page_load and only once: if(!Page.IsPostBack){ FillTreeView(…); }

When I do not call FillTreeView() method, ie I do not use TreeView it’s all works fine. I have a search part in my page, implemented in another UpdatePanel, and it works very fast with max speed of 12-30 Kb/s, but with the TreeView load it reaches to 250-400 Kb/s.

Actually, the treeview implemented in updatepanel, restrains my web page, doing full page postbacks every time I do Any kind of action with the page, even if I don’t touch the treeview at all - when I use my search, which is absolutely nothing to do with it, not connected to treeview in no manner.

My dear friends, collegues, programmers, help me please with your good and usefull advices, thanks !!!

推荐答案

您已阅读文档吗?

http://msdn.microsoft.com/en-us/library/bb386454.aspx [ ^ ]

以下ASP.NET控件与部分页面更新不兼容,因此不能在UpdatePanel控件中使用:

在几种情况下使用TreeView控件.
Have you read the documentation?

http://msdn.microsoft.com/en-us/library/bb386454.aspx[^]

The following ASP.NET controls are not compatible with partial-page updates, and are therefore not designed to work inside an UpdatePanel control:

TreeView control under several conditions.


只是 ASTreeView-免费的ASP.NET TreeView控件 [ Treeview jQuery插件 [
Just a a small addition to Mark Nischalkes answer[^].

This could help to speed up things a bit:
ASTreeView - Free ASP.NET TreeView Control[^]

or even better:
Treeview jQuery Plugin[^]

Regards
Espen Harlinn


这篇关于asp:UpdatePanel中的asp:TreeView-问题-页面性能不佳的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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