按钮、UpdatePanel 和 MasterPage
我在表单上有 asp.net 应用程序和来自 AjaxControlToolkit 的 TabContainer。有 4 个选项卡,每个选项卡都包含 UpdatePanel、隐藏按钮和一些自定义 .ascx(每个选项卡都有自己的 javascript 文件)。按钮是面板更新内容的触发器,它们是由 TabContainer 的“OnClientActiveTabChanged”事件触发的。
我遇到的唯一问题是,整个场景在用作单独页面时有效,但当母版页位于该页面周围时似乎不起作用。突然之间,按钮充当了完整的回发控件。 你知道原因是什么吗?
I have asp.net application and a TabContainer from AjaxControlToolkit on a form. There are 4 tabs, each containing UpdatePanel, hidden button and some custom .ascx (each with it's own javascript file). Buttons are triggers for panels to update the contents and they are triggered from the 'OnClientActiveTabChanged' event of the TabContainer.
This technique is described here and similiar here. It's pretty simple when looking at it.
The only problem I have is that the whole scenario works when used as a separate page but it doesn't seem to work when masterpage is around that page. Suddenly buttons act as full postback controls.
Do you have any idea what's the reason?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
假设您引用的按钮位于母版页上,我认为您需要将母版页按钮注册为更新面板触发器。
http://www.asp.net/ajax/tutorials /理解-asp-net-ajax-updatepanel-触发器
Assuming the buttons your referring to are on the master page, I think you'll want to register the master page buttons as update panel triggers.
http://www.asp.net/ajax/tutorials/understanding-asp-net-ajax-updatepanel-triggers