在modelpopupextender中未触发按钮单击事件 [英] button click event is not fired in modelpopupextender
本文介绍了在modelpopupextender中未触发按钮单击事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有一些问题... Plz帮我解决这个问题
我在ModalPopupExtender中遇到问题。当我点击弹出的提交按钮时,它不会调用为按钮点击编写的代码背后的代码。
Hi, having some problem...Plz help me out from this
I have problem in ModalPopupExtender. When I click on submit button of pop up it does not call the code behind code written for button click.
<ajaxtoolkit:modalpopupextender id="ModalPopupExtender" runat="server"
cancelcontrolid="LinkButton1" dropshadow="false" okcontrolid="btnSubmit" X="200" Y="100" popupcontrolid="Panel1" targetcontrolid="imgSchedul">
<aspanel id=Panel1 runat="server" style="display:none;">
<asp:Button ID="btnSubmit" runat="server" Text="Submit"
onclick="SubmitData" ValidationGroup="MainValidation"/>
protected void SubmitData(object sender, EventArgs e)
{
//code for submit data.
}
我在代码隐藏文件中为btnSubmit写了onclick事件。现在我的问题是,当我点击面板上的提交按钮时,此事件没有触发。
I have written onclick event for btnSubmit in code behind file. Now my problem is, this event is not firing when I click Submit Button on Panel.
推荐答案
设置 CausesValidation =false按钮检查它是否有效。
还请从你的模型弹出窗口中删除 OkControlID 属性。
Set CausesValidation="false" for button and check if it works.
And also please remove OkControlID attribute from your Model Pop Up.
这篇关于在modelpopupextender中未触发按钮单击事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文