当单击容器更新面板中的其中一个控件时,我的 ascx 控件会进行完全刷新
当单击容器更新面板中的某个控件时,我的 ascx 控件会进行整页刷新。 以前有人遇到过这种行为吗?
谢谢。
My ascx control inside a container update panel does a full page refresh when one of the controls inside it is clicked.
Has anyone faced this behavior before?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果该控件位于更新面板内,那么它应该如何工作。 当更新控件内触发事件时,它应该刷新。 现在,如果您在控件内有一个更新面板,并且单击的按钮位于更新面板中,并且整个控件正在刷新,那么这将是奇怪的行为!
尝试在控件中放置一个额外的更新面板,然后手动设置导致哪个更新面板实际更新的事件。 这会给你更多的控制权!
If the control is inside the update panel then this is how it should work. When an event is fired inside the update control it is supposed to refresh. Now if you had an update panel inside the control and the button being clicked were in the update panel and the whole control was refreshing then this would be odd behavior!
Try putting an additional update panel in the control and then manually set the events for what is to cause which update panel to actually update. This will give you more control!