开发者

How To Change Ajax Control Toolkit Controls Button Text

Ajax Control Toolkit provides too many 开发者_Python百科useful control and I've use them in a multi language application, nothings bad and everything's fine.

the question is that , How can I change the Ajax Control Toolkit Buttons Text, for example in Confirm Button Extender and vice versa .

any help appreciated


I misunderstood what you were after. To customize the button text, you have to create your own modal and instruct the extender to use it with the DisplayModalPopupID property, like this:

 <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>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜