Yes No Confirmation Box using JavaScript in ASP.Net

Last Reply one year ago By kalpesh

Posted one year ago


<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Post.aspx.vb" Inherits="Forms_Post" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">

<html xmlns="">
<head runat="server">
    <title>POST BOOKS </title>
    <form id="form1" runat="server">
     <script type = "text/javascript">
        function Confirm() {
            var confirm_value = document.createElement("INPUT");
            confirm_value.type = "hidden";
   = "confirm_value";
            if (confirm("ARE SURE YOU WANT TO POST THESE BOOKS NOW?")) {
                confirm_value.value = "Yes";
            } else {
                confirm_value.value = "No";
           <script type = "text/javascript">
    function askConfirm(msg)
{      alert(msg)
    <asp:Button ID="Button1" runat="server" OnClick="OnConfirm" Text="PostBooks" OnClientClick="Confirm()" 
        style="top: 83px; left: 475px; position: absolute; width: 87px; height: 32px" 
    <asp:Label ID="Label1" runat="server" 
        style="font-weight: 700; font-family: 'MS Gothic'" 
        Text="N.B Posting this information will update the books you have in stock  and it will help you to have up to date library Total number of books,Total of lost books etc"></asp:Label>


This question does not have replies marked as Answer.