如何在调用用户控件时停止回发
我有一个 ModalPopupExtender 控件和一个包含 iframe 的面板。 ModalPopupExtender 的 TargetControlID 属性设置为名为 btnFind 的 html 按钮控件。
当我单击“查找”按钮时,带有 iframe 控件的面板显示为模式弹出窗口。
这工作得很好,但后来我决定将这些控件带到用户控件中,并更简单地多次使用它。我做到了,它有效,但是当我调用用户控件打开模式弹出窗口时,我的主页正在回发。我无法阻止它。我的用户控件的语法如下。谁能给我一些建议来停止回发?
<PBG:Modal ID="mdlFind" runat="server" Height="460" Width="840" TargetControlId="btnFind" />
I have a ModalPopupExtender control and a panel which contains a iframe. The ModalPopupExtender's TargetControlID property is set to a html button control named btnFind.
When I click to find button, the panel with its iframe control shows as a modal popup.
This is work fine,but then I decided to take these control to an usercontrol and use this simplier and many times. I made it, and it works, but when I call usercontrol to open modal popup, my Main page is postbacking. I couldn't stop it. My user control's syntax is below. Can anyone give me some advices to stop the postback?
<PBG:Modal ID="mdlFind" runat="server" Height="460" Width="840" TargetControlId="btnFind" />
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试删除
runat="server"
Try removing
runat="server"