ConfirmButtonExtender1

ConfirmButtonExtender1

本文介绍了如何从后面的代码设置ConfirmButtonExtender1的确认文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我有一个ConfirmButtonExtender1并将目标控件ID设置为button1.

现在我已经在某些条件下显示了消息,我将在按钮的单击事件上得到提示.

请帮忙.


谢谢
Mohd wasif

Hi All,


I have a ConfirmButtonExtender1 and set target control id as button1.

Now i have show message on certain conditions that I will get on click event of button.

Please help.


Thanks
Mohd wasif

推荐答案



ConfirmButton Demonstration
Click Me



ConfirmButton Description

ConfirmButton is a simple extender that catches clicks on a button (or any instance of a type derived from Button) and displays a message to the user. If the "OK" button is clicked, the button or link functions normally. If not, the click is trapped and the button will not perform its default submit behavior; optionally, a client script is executed if the OnClientCancel property is set. This is useful for delete links or anything else that requires confirmation from the user.
ConfirmButton Properties

The control above is initialized with this code. The italic properties are optional:

<ajaxToolkit:ConfirmButtonExtender ID="cbe" runat="server"
    TargetControlID="LinkButton1"
    ConfirmText="Are you sure you want to click this?"
    OnClientCancel="CancelClick" />

    TargetControlID - The ID of the button or link for this extender to operate on.
    ConfirmText - The text to show when you want to confirm the click. (Note: HTML entities can be used here (ex: "&#10;" for new-line))
    OnClientCancel - The client-side script that executes when the cancel button is clicked in the confirm dialog.
    ConfirmOnFormSubmit - True if the confirm dialog should wait until just before the form submits to display. This is useful when ASP.NET validators are in use and the confirm should be shown only after all validators pass.
    DisplayModalPopupID - Optionally specifies the ID of a ModalPopup control to use for displaying the confirmation dialog (instead of window.confirm). When using DisplayModalPopupID, the following conditions must be met:
        The ModalPopup must be configured to work against the same TargetControlID as the ConfirmButton (and should work properly if the ConfirmButton is disabled).
        The ModalPopup must specify OkControlID and/or CancelControlID to identify the buttons corresponding to window.confirm''s OK/Cancel buttons.
        The ModalPopup must not specify OnOkScript or OnCancelScript.


这篇关于如何从后面的代码设置ConfirmButtonExtender1的确认文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-18 02:45