Ajax Control Toolkit提供了太多有用的控件,我在多语言应用程序中使用它们,并不是很糟糕,一切都很好。
问题是,如何更改Ajax Control Toolkit按钮文本,例如在Confirm Button Extender中,反之亦然。
任何帮助表示赞赏
答案 0 :(得分:2)
我误解了你的意思。要自定义按钮文本,您必须创建自己的模式并指示扩展程序将其与DisplayModalPopupID
属性一起使用,如下所示:
<asp:Button ID="btnCancel" ruat="server" Text="Cancel With Confirm" />
<cc1:ConfirmButtonExtender ID="ConfirmButtonExtender" runat="server"
TargetControlID="btnCancel"
OnClientCancel="cancelClick"
DisplayModalPopupID="MyCustomModal" />
<cc1:ModalPopupExtender ID="MyCustomModal" runat="server"
TargetControlID="btnCancel"
PopupControlID="PNL"
OkControlID="ButtonOk"
CancelControlID="ButtonCancel"
BackgroundCssClass="modalBackground" />
<asp:Panel ID="PNL" runat="server">
Are you sure you want to cancel?
<br /><br />
<div class="buttons">
<asp:Button ID="ButtonOk" runat="server" Text="Yes (Custom!)" />
<asp:Button ID="ButtonCancel" runat="server" Text="No (Custom!)" />
</div>
</asp:Panel>