[How Do I:] Use the ASP.NET AJAX ConfirmButton Extender?

Please install Silverlight or click download to watch video locally.

Learn how the ConfirmButton extender in the ASP.NET AJAX Control Toolkit provides a simple way to add a confirmation dialog to the click event of a Button, LinkButton, or ImageButton control. This provides the user with the option to cancel an impending action.

Presented by Joe Stagner

Duration: 3 minutes, 34 seconds

Date: 05 March 2007

Watch    Video   |   Download    Video   |   VB Code    C# Code

Video downloads: WMV  |  Zune  |  iPod  |  PSP  |  MPEG-4  |  3GP

Audio downloads: AAC  |  WMA  |  MPEG-4  |  MPEG-3  |  MPEG-2

Comments : 21

Leave a Comment

JBONNIE : On March 14, 2008 2:40 PM said:

The vb code sample is from the AutoCompleteExtender, although I should be ashamed for having to do download it at all!

JoeStagner : On March 15, 2008 10:18 AM said:

Oops, Thanks I'll get it replaced.

Moondust : On April 14, 2008 7:32 PM said:

It hasn't been replaced yet.  

iamtgo3 : On April 16, 2008 1:44 PM said:

Still not updated AutoCompleteExtender example.

JoeStagner : On April 16, 2008 3:00 PM said:

:) Guys.

the .aspx file would be the same excedpt for the first line that defines the language and code behind.

The .vb code behind is only the Button1 click event handler and the transbation from C# to VB is east.

- C# Version

Label1.Text = "Text from the serverside.";

- VB Version

Label1.Text = "Text from the serverside."

JoeStagner : On April 16, 2008 3:11 PM said:

PS The file update has been submitted to the content managers.

jim.bridgeford : On May 06, 2008 2:32 PM said:

can i had data from a variable to a confirmbutton extender

venugopalvalivarthi : On July 09, 2008 7:04 AM said:

Hi ,

I am using the confirmbutton its nice i want to show the dynamic maessage on the dialog box how can it be possible and is it code behind we can set the confirmtext=some xyz in load we can asign the confirm text hw can i assign text in button and dynamically can u suggest me plz

cv_vikram : On August 06, 2008 2:05 PM said:

Very good video....

nziese : On August 28, 2008 10:41 AM said:

This is a great little extender - easy to use.  Is there a way to crate some code behind to handle the cancel button click?

NIckKhaja : On September 08, 2008 11:24 AM said:

I tried to use modal popup extender....but what I should write for the okControlID and cancelControlID????

I am using confirm Extender on the button as well....

and I don't know what wll b the ID for the ok and cancel button of the confirm extender.

waiting for the answer!!!!!

lhkok : On November 06, 2008 10:28 PM said:

Thanks Joe, for the video.

There are two desirable effect that are available in the demo page (www.asp.net/.../Confirm Button/ConfirmButton.aspx) but no available in your video.

In the demo page, the pop up box is clean without the window bar. Also, when the box pop up, the background become faded and inactive. May I know how can I do that?

grimrist : On December 03, 2008 12:06 PM said:

In order to get this to work inside of an UPDATEPANEL, the sweet thing that doesn't post back the entire page, you have to add the 'ConfirmOnFormSubmit="True".

As for handeling the cancel button click just try to keep in mind where you are trying to redirect their attention to and perhaps that will help with the next step.

I personally would switch to using ScriptManager.RegisterStartupScript(,,,,) if you wish to handle more events.

halfdevil : On December 12, 2008 2:00 AM said:

Thx for the video.

Is it possible to change the ok & cancel button become yes & no???

huyencuong : On December 15, 2008 9:48 AM said:

Thank you !

djibril_chimere_DIAW : On December 30, 2008 8:27 AM said:

Thanks! Jërëjëf!

mford : On January 26, 2009 8:05 PM said:

Thanks for sharing knowledge.  I have been trying to use this ajax control in lieu of other javascript solutions found on the internet forums, all rendering the following error when I publish to IIS and run the website from there using IE6.  What could I be missing?  

Error: "Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.

I have also tried:  

Me.Button1.Attributes("onClick") = "return confirm('Are you sure you want to SEND EMAILS NOW?');"

and separately

<asp:Button ID="Button1" runat="server" Text="Send Auto Email"  OnClientClick="return confirm('Are you sure you want to SEND EMAILS NOW?')" />&nbsp;

ZoomZoomLover : On February 22, 2009 6:43 PM said:

Has anybody noticed that the message box appears different in Firefox, Is there a way to fix it?

queen_of_the_world : On March 18, 2009 12:06 PM said:

helpful material

haithemara : On May 19, 2009 10:40 AM said:

thank you.

PC king : On August 24, 2009 11:01 AM said:

thnk u

Leave a Comment

You must be logged in to leave a comment. Click here to log in.

Microsoft Communities