Yes No Confirmation Box using JavaScript in ASP.Net

Last Reply 8 months ago By kalpesh

Posted 8 months ago

 

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

<!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 runat="server">
    <title>POST BOOKS </title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
     <script type = "text/javascript">
        function Confirm() {
            var confirm_value = document.createElement("INPUT");
            confirm_value.type = "hidden";
            confirm_value.name = "confirm_value";
            if (confirm("ARE SURE YOU WANT TO POST THESE BOOKS NOW?")) {
                confirm_value.value = "Yes";
            } else {
                confirm_value.value = "No";
            }
            document.forms[0].appendChild(confirm_value);
        }
    </script>
           <script type = "text/javascript">
    function askConfirm(msg)
{      alert(msg)
      }
 </script>
    </div>
    <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 reports.eg Total number of books,Total of lost books etc"></asp:Label>
    </form>
</body>
</html>

 

Posted 8 months ago

Explain in more details.


Posted 8 months ago Modified on 8 months ago

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