如何在用户控件中使用Ajax Modalpopupextender?
你好,我正在学习 asp.net webforms,我现在正在创建用户控件并尝试使用 ajaxtoolkit。
在我的用户控件上,我从 Ajax-MessageBox Dotnetgurus 复制此代码
<asp:Button ID="btnD" runat="server" Text="" Style="display: none" Width="0" Height="0" />
<AjaxControls:ModalPopupExtender ID="mpeMsg" runat="server" TargetControlID="btnD"
PopupControlID="pnlMsg" PopupDragHandleControlID="pnlMsgHD" BackgroundCssClass="mpBg"
DropShadow="true" OkControlID="btnOK">
</AjaxControls:ModalPopupExtender>
我想在其中添加 Modalpopupextender,但是当我将其拖动到我的 btnD 时,会显示错误消息框。
The operation could not be completed. Invalid FORMATETC structure
Warning 1 Generation of designer file failed: Unknown server tag 'AjaxControls:ModalPopupExtender'.
没有>当我在表单上拖动新按钮时,也会出现符号,因为我无法添加扩展程序。
谢谢问候
Hi i am studying asp.net webforms and i am now creating usercontrols and trying to use ajaxtoolkit.
On my user Control i copy this code from Ajax-MessageBox Dotnetgurus
<asp:Button ID="btnD" runat="server" Text="" Style="display: none" Width="0" Height="0" />
<AjaxControls:ModalPopupExtender ID="mpeMsg" runat="server" TargetControlID="btnD"
PopupControlID="pnlMsg" PopupDragHandleControlID="pnlMsgHD" BackgroundCssClass="mpBg"
DropShadow="true" OkControlID="btnOK">
</AjaxControls:ModalPopupExtender>
and i want to add Modalpopupextender in it but when i drag it to my btnD an error message box shows.
The operation could not be completed. Invalid FORMATETC structure
Warning 1 Generation of designer file failed: Unknown server tag 'AjaxControls:ModalPopupExtender'.
There is no > symbol also when i drag new button on the form because of that i cant add extender.
Thanks in Regards
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您需要在 web.config 或 UserControl 中注册 AjaxControlToolKit.dll,例如:
或在 UserControl 中,例如:
<%@ 注册 tagprefix="tagprefix"
命名空间=“命名空间”
程序集=“程序集”%>
You need to register the AjaxControlToolKit.dll either in web.config or in your UserControl like:
or in UserControl like:
<%@ Register tagprefix="tagprefix"
namespace="namespace"
assembly="assembly" %>
Ajaxtoolkit
问候
Ajaxtoolkit
Regards