如何在asp.net的ajax模型弹出中添加两个按钮



这里我使用了两个按钮,一个保存,另一个关闭。

当我点击保存按钮,它不触发事件,但弹出窗口出现。请告诉我该怎么做?

cc1:modalpopupextender ID="mp1" runat="server" PopupControlID="Panl1" TargetControlID="btnnewcategory"  BehaviorID="btnsave"
    CancelControlID="btnclose" BackgroundCssClass="Background"
cc1:modalpopupextender

试试这个…添加一个隐藏的按钮…

<asp:Button ID="btnShowPopup" runat="server"  style="display:none" />

添加modal popupextender..

 <asp:ModalPopupExtender ID="brandaddpopup" runat="server" DynamicServicePath="" Enabled="True" TargetControlID="btnShowPopup" CancelControlID="btnclose" Drag="true" PopupControlID="Panl1" >
</asp:ModalPopupExtender>

代码后面:

 protected void btnSave_Click(object sender, EventArgs e)
 {
     //Saving Process goes here
     this.mp1.Show();
 }

最新更新