In This tutorial we will Learn how to Create and Use a Confirm Button Extender.

Step 1. Create the Web Form

1. Start by Creating a new Web Form and naming it “Default.aspx”
2. Create a Button and a Label on the form named “Button1″ and “Label1″
3. Add an AJAX Script Manager to the Form so that we can use AJAX Controls
4. Add the Confirm Button Extender to the button by clicking the Smart tag and selecting Add Extender
5. Now the Web Form is complete, but it is not ready to be run yet.

Step 2. Create the Code Behind

1. Double click on the Button Control in the Design View to open up the Code window.
2. Enter the Code Below, this code would normally make the Label say OK every time you click the button,
however the code in the front end only lets it run once you confirm.
3. Once this code is in you can go ahead and run the project and see how it works.


In This Tutorial we Learned how to create and use a Confirm Button Extender in AJAX. This button can be used to warn people of what a button does once they press it. This control is used in lots of websites and it is easy to setup and use.

Download Source Files