Confirm Button Extender
This control is used to display a confirmation message before executing the code of a button.
Target Control ID :
Used to specify ID of a button control for which you want to display a confirmation message.
Confirm Text :
Used to specify the confirm message to display when user click on the target control.
The following example demonstrates how to use the confirm Button Extender.
Add a page to the website and place a Tool Kit script manger on it.
Take two textboxes and a Button a page and for the textboxes set the ID T1 & T2 and for the Button set the ID Btncopy. Set the caption for Button as copy
Write the following code within the copy button click event to copy the text in T1 to the text box T2.
Button Click Event
T2. Text=T1. Text
- within the HTML source of the page drag & drop a confirm button extender and set following properties to it.
<asp: confirmButtonExtender ID=confirmButton Extender1 runat=”server” TargetControlID=”Btncopy” confirm Text=”Do you re
Really want to copy ? ”> </asp: confirmButtonExtender>
At runtime after typing some text in T1 if you click on the copy Button then it will display a confirmation message and within this when you click on cancel Button then executing the code of copy button will be cancelled and clicking on ok Button will execute the code of copy Button