Dropthings 和加载用户控制内容
我开始查看 dropthings 门户,但我不明白小部件中的内容是如何加载的。我的理解是,标题位于 Updatepanel 中,小部件的主体位于 UpdatePanel 中,其中包含 ASP 面板。加载页面时,首先加载所有小部件的 ASP 面板,然后再加载面板中的用户控件。
有人可以解释这是如何发生的并指出我设置此设置的代码吗?
任何帮助表示赞赏
I started looking at the dropthings portal and I don't understand how the content within the widget gets loaded. My understanding is that the header is in an Updatepanel and the body of the widget is in an UpdatePanel with a ASP Panel in it. When the page loads, the ASP Panels of all the widgets load first before loading the User controls within the panels.
Can someone explain how this happens and point me to the code where this is setup?
Any help is appreciated
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我使用的是 2.7.5 版本(1 月 11 日发布),所以这可能有点新。
每个小部件都是一个用户控件,并托管在 WidgetContainer.ascx 中。 WidgetContainer 提供了所有常用功能,如标题重命名、定位、展开/折叠、编辑等。源文件位于根“dropthings”文件夹中。查看 Init 方法,我们可以看到 UserControl 实例化的位置&添加到页面:
因此,首先将 WidgetContainer 添加到配置的每个 Widget 的控件树中。然后,在初始化每个容器时,它会创建特定的 UserControl,然后将其添加到页面。当
被调用时,它将初始化(OnInit)特定的小部件。从那里开始,小部件的内容就掌握在它自己的手中。
I'm using version 2.7.5 (released Jan 11), so this might be a bit newer.
Each widget is a user control, and is hosted in a WidgetContainer.ascx. The WidgetContainer provides all the common functions like the title renaming, positioning, expand/collapse, editing, etc. The source file is in the root "dropthings" folder. Looking at the Init method, we can see where the UserControl instantiated & added to the page:
So, first the WidgetContainer is added to the control tree for each Widget configured. Then as each container is initialized, it creates then adds the specific UserControl to the page. When
is called, it will initialize (OnInit) the specific widget. From there the contents of the widget are in it's own hands.