Net-informations.com
SiteMap  | About    

Ajax ConfirmButtonExtender

ASP.NET AJAX Control Toolkit is an open-source project built on top of the Microsoft ASP.NET AJAX framework. The Ajax Control Toolkit contains a rich set of controls that you can use to build highly responsive and interactive Ajax-enabled Web applications.

confirmationButton

The Ajax Control Toolkit contains more than 40 controls. The ConfirmButton is a simple extender that displays the confirm box with a confirmation message and OK, Cancel button also catches clicks on a button and displays a message to end user.

To use the Ajax Control Toolkit in your Visual Studio project, you should add reference to the AjaxControlToolkit.dll in your project.

Default.aspx

  

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
	<title>Untitled Page</title>
</head>
<body>
	<form id="form1" runat="server">
	<div>
        <br />
        <asp:Label ID="Label2" runat="server" Text="">
        </asp:Label>
        <br /><br />
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <asp:Button ID="btnConfirm" runat="server" Text="Show Server Time"
            OnClick="btnConfirm_Click" />
            <asp:ConfirmButtonExtender ID="ConfirmButtonExtender1" runat="server"
            TargetControlID="btnConfirm"
            ConfirmText="Dyou want to see current server time ?"
            ConfirmOnFormSubmit="false">
            </asp:ConfirmButtonExtender>
            <br /><br />
            <asp:Label ID="lblMessage" runat="server">
            </asp:Label><br />
        </ContentTemplate>
        </asp:UpdatePanel>
	</div>
	</form>
</body>
</html>


Click the following links to see full source code

C# Source Code
VB.NET Source Code
Default.aspx.cs
Default.aspx.vb





net-informations.com (C) 2017    Founded by raps mk
All Rights Reserved. All other trademarks are property of their respective owners.