ConfirmButton Control Extender of AJAX Control Toolkit provides the functionality similar to that of Javascript confirm box. In Javascript you use window.confirm method to popup a message box to confirm the action of user. When the user hits OK button of confirm box then it returns true and allows the web page to perform its postback submit action. Otherwise, if user clicks the cancel button then it returns false and stops the page to perform submit action.
ConfirmButton Extender also displays the confirm box with a confirmation message and OK, Cancel button to approve the client action. ConfirmButton extender control consists of some properties that can be used to customize the ConfirmButton behavior. Following are the properties:
TargetControlID: The ID of the button or link button control that will call the ConfrimButton extender message alert with confirmation message.
ConfirmText: The text to be displayed in the confirmation box. You can use as new line feeder.
ConfirmOnFormSubmit: If false then does not execute the server code until there is any ASP.Net validation control is active on the web page.
onClientCancel: You can call the javascript client side function to perform some action.
HTML code:
C# code:
{
}
Be the first to rate this post
Tags: asp.net 2.0, ajax, ajax confirmbutton control, asp.net ajax control toolkit, alwaysvisiblecontrol extender, confirmbutton extender
8/23/2008 8:59:43 PM