W当我单击弹出窗口上的按钮将数据插入数据库时,它什么也不做,为什么?
<cc1:ModalPopupExtender ID="ModalPopupExtender1" runat="server" BehaviorID="popup" TargetControlID="cmdTrigger"
PopupControlID="pnlPopup" BackgroundCssClass="modalBackground"
OkControlID="btnOk" >
</cc1:ModalPopupExtender>
<asp:Panel ID="pnlPopup" runat="server" CssClass="modalpopup" Style="display: none">
<div class="container">
<div class="header">
<asp:Label ID="Label1" runat="server" CssClass="msg" Text="Add a new Entry" />
<asp:LinkButton ID="LinkButton1" runat="server" CssClass="close" OnClientClick="$find('popup').hide(); return false;" />
</div>
<div class="body">
<asp:Label ID="Label2" runat="server" CssClass="msg" Text="Name" />
<asp:TextBox ID="txtName" runat="server" Width="346px"></asp:TextBox>
</div>
<div class="footer">
<asp:Button ID="btnOk" runat="server" Text="Save" Width="48px" />
<asp:Button ID="btnCancel" runat="server" Text="Cancel" Width="50px" OnClientClick="$find('popup').hide(); return false;" />
</div>
</div>
</asp:Panel>
btnOK 上的代码是
一个简单的 textbox1.text = txtName
我什至尝试设置断点,按钮单击事件没有被执行。有任何想法吗?
编辑~解决方案