asp.net 多个 updatepanels 持有带有 jquery 部分回发问题的用户控件
我有一个页面,在不同的更新面板中包含多个用户控件。用户控件包括用于计算某些值和绘制图形的 jquery 调用(jquery 不调用服务器方法)。
问题是,无论刷新什么 updatepanel,所有 jquery 调用都会再次处理。我认为问题的出现是因为我使用用户控件的页面加载方法来执行 jquery 方法调用。
我想知道是否有办法阻止其他用户控件调用其页面加载方法或刷新。
提前致谢。
I have a page with several user controls in different updatepanels. The user controls includes jquery calls which are used to calculate some values and draw graphs(no server methods are called from jquery).
The problem is that, whatever updatepanel is refreshed, all of the jquery calls are processed again. I think the problem arises because i use pageload methods of the usercontrols to do jquery method calls.
I wonder whether there is a way to stop other user controls from calling their pageload methods or refreshing.
thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
也许这会有所帮助...当您在渲染控件的页面上包含自定义控件时,这并不完全是一个答案
HTML 包含在页面中,因为它与所有 JavaScript 和 css 一起使用(您可以执行“查看页面源代码”)并进行检查。
因此,实际上,您的页面(包含用户控件的页面)中可以有 3 个页面加载,位于不同的标签中,因此当任何更新面板刷新时,所有页面加载都会被调用。
maybe this would help...not exactly an answer
when you include custom controls on a page on rendering the controls HTML is included in the page as it is with all JavaScript and css( you can do a View page Source) and check that.
and so in effect there can be 3 pageloads in your page(the page that has the user controls included) in different tags and as such all are getting called when any update panel refreshes.