[英]My Mehod on btnclick is not working, here i have given the code
Cant call method of Button if Button is added to panel in the .net so wt can i do? 如果在.net中将Button添加到面板中,则无法调用Button的调用方法,那么我可以做什么?
Add Category 添加类别
</asp:Panel>
<asp:Label ID="LblMsg" runat="server"></asp:Label>
<cc1:ModalPopupExtender ID="LnkBtnAddCategory_ModalPopupExtender" runat="server"
TargetControlID="LnkBtnAddCategory"
PopupControlID ="ModelPanel1"
OkControlID="BtnOKModel"
OnOkScript="onOK()"
CancelControlID="BtnCancelModel"
DropShadow="true"
BackgroundCssClass="modalBackground"
>
</cc1:ModalPopupExtender>
It is still quite difficult to really understand the origin of your problem or what exactly you'd like to achieve. 真正了解问题的根源或您要实现的目标仍然非常困难。
The OnOkScript
property points to a JavaScript function which I suppose you understood correctly since you're mentioning JavaScript in your question post. OnOkScript
属性指向一个JavaScript函数,我想您已经正确理解了,因为您在问题中提到了JavaScript。 So to achieve a postback (not ajax) you could try to do something like 因此,要实现回发(而不是ajax),您可以尝试做类似的事情
function onOk() {
document.getElementById('<%=ButSave.ClientID%>').click();
return true;
}
Alternatively you have to do it asynchronously. 或者,您必须异步执行此操作。 In that situation you have two possibilities
在这种情况下,您有两种可能
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.