Targetcontrolid-The ID of the button control to extend. (ButtonControls)
Confirmtext-The confirmation text to display. html entities can be used, such as & #10; for a newline character. (The confirmation text to be displayed can be an HTML object, such as a line break)
Onclientcancel-The client script to execute when the cancel button is clicked in the confirm dialog box. (The client script executed when you click "cancel" in the confirmation dialog box)
Confirmonformsubmit-True if the confirm dialog box shocould not be displayed until just before the form is submitted. this is useful if the page contains ASP. net validator controls and the confirm dialog box shoshould be displayed only after all validation checks pass. false (default ). (When the value is set to true, the confirmation dialog box is displayed only when the form is submitted, which contains ASP. net verification control (that is, the confirmation dialog box is displayed only when all verification controls are out of date) is very useful .)
Displaymodalpopid-Speicifies the ID of a modalpopup control to use to display the confirm dialog box. Instead of the defaultWindow. ConfirmWindow. When you useDisplaymodalpopupidProperty, the following conditions must be met:
A. The modalpopup control must be configured with the sameTargetcontrolidValue as the confirmbutton extender. (It will work properly if the confirmbutton extender is disabled .)
B. The modalpopup control must specifyOkcontrolidOrCancelcontrolidProperties in order to identify the buttons that correspond to the OK and cancel buttons in the confirm dialog box.
C. The modalpopup must not specifyOnokscriptOrOncancelscriptProperty.
A. The targetcontrolid of the modalpopup control must be consistent with that of the confirmbutton control;
B. A valid okcontrolid and cancelcontrolid must be set in the modalpopup control to be consistent with the "Confirm" and "cancel" buttons in the confirmation dialog box;
C. The corresponding onokscript and oncancelscript processing scripts must be set .)
1 < ASP: scriptmanager ID = "Scriptmanager1" Runat = "Server" />
2 < Div >
3 < BR />
4 < ASP: Label ID = "Label1" Runat = "Server" Width = "273px" > </ ASP: Label > < BR />
5 < BR />
6 < ASP: button ID = "Button1" Runat = "Server" Onclick = "Button#click" Text = "Button" Width = "175px" />
7 < Ajaxtoolkit: confirmbuttonextender ID = "Confirmbuttonextender1" Runat = "Server" Targetcontrolid = "Button1"
8 Confirmtext = "Are you sure you want to submit? " >
9 </ Ajaxtoolkit: confirmbuttonextender >
Protected VoidButton#click (ObjectSender, eventargs E)
Label1.text= "Text from the serverside.";