Let us take a look at the Confirm Button control which is
much simpler then the Collapsible Panel. The purpose of the Confirm Button
control is to give the user a confirmation message after they click the button.
The message contains two choices, "OK" or "Cancel." If
the user selects "OK," then the operation is completed. If
"Cancel" is selected then the operation is aborted.
Creating a Simple Button Control
Our first task is to create a very simple button control.
Listing 8 – HTML of the Button Control
<asp:Button ID="Button1"runat="server" Text="Press Me!"OnClick="Button1_Click" />
Now add the ConfirmButtonExtender control from the toolbox.
Listing 9 – ConfirmButtonExtender Control
<cc1:ConfirmButtonExtenderID="ConfirmButtonExtender1" runat="server">
<cc1:ConfirmButtonPropertiesConfirmText="Are you sure?" TargetControlID="Button1" />
</cc1:ConfirmButtonExtender>
Analysis
TargetControlID: The ID of the button control from which
will pop the confirmation box.
ConfirmText: The text shown to the user when they click the
button.
Figure 3