我的 btnclick 方法不起作用,这里我给出了代码
如果将 Button 添加到 .net 中的面板中,则无法调用 Button 的方法,那么我可以做什么?
- 我的代码
添加类别
</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>
Cant call method of Button if Button is added to panel in the .net so wt can i do?
- my code
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>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
真正理解你的问题的根源或者你到底想要实现什么仍然是相当困难的。
OnOkScript
属性指向一个 JavaScript 函数,我想您理解正确,因为您在问题帖子中提到了 JavaScript。因此,要实现回发(而不是ajax),您可以尝试执行类似的操作,或者您必须异步执行此操作。在这种情况下,您有两种可能性
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. So to achieve a postback (not ajax) you could try to do something likeAlternatively you have to do it asynchronously. In that situation you have two possibilities