模态弹出控件ajax [英] Modal popup control ajax
本文介绍了模态弹出控件ajax的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是我用于modalpopup控制的代码.但是它将无法正常工作.页面加载本身会提供弹出窗口,而按钮事件不会生成模式弹出窗口.
我的代码有什么错误吗?
有人可以帮我吗?
Hi,
This is my code for modalpopup control.but it will not work.page loading itself it will give the popup window and the button event not generate a modal popup.
is there any mistake in my code?
can any one help me?
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<asp:Button ID="Button1" runat="server" Text="Show Modal" OnClick="Button1_Click" />
<asp:Panel ID="pnlModal" runat="server" CssClass="modal">
<div class="rel">
<div class="modal-inner-wrapper rounded-corners">
<div class="content rounded-corners">
<div class="close">
<asp:LinkButton ID="btnClose" runat="server">close
</div>
<div class="body">
<p>Ajax sample!</p>
</div>
</div>
</div>
</div>
<cc1:ModalPopupExtender ID="ModalPopupExtender1" runat="server" BackgroundCssClass="modal-bg" TargetControlID="Button1" PopupControlID="pnlModal" CancelControlID="btnClose" >
推荐答案
删除onclick属性从按钮
remove onclick attribute from button
<asp:button id="Button1" runat="server" text="Show Modal" />
希望它能工作.
hope it will work..
您的
在哪里
where is your
</asp:Panel>
关闭面板标签,然后尝试.
试试
Close your panel tag and then try.
try
<asp:Button runat="server" ID="Button3" Style="display: none" />
<cc1:ModalPopupExtender ID="ModalPopupExtender1" runat="server" BackgroundCssClass="modal-bg" TargetControlID="Button3" PopupControlID="pnlModal" CancelControlID="btnClose" >
并在Button1上单击事件使用
and on Button1 click event use
this.ModalPopupExtender1.Show();
这篇关于模态弹出控件ajax的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文