Yes No Confirmation Box using JavaScript in ASP.Net

Last Reply on Mar 15, 2018 07:58 AM By kalpesh

Posted on Mar 15, 2018 04:12 AM


<%@ 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>


Posted on Mar 15, 2018 04:13 AM

Explain in more details.

Posted on Mar 15, 2018 07:35 AM Modified on on Mar 15, 2018 07:36 AM

Good after noon i would like to show a small dialogue wepage with a POST button note the whole we page like a modal popup page please help Similar to a popup small Display


Posted on Mar 15, 2018 07:58 AM Modified on on Mar 15, 2018 08:07 AM