Click here to Skip to main content
15,912,400 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi there
Can anyone tell me how to get the value of a confirmation messagebox in front end code?
Thank you in advance
I meant I can use Messagebox with javascript but I want to get the boolean value 0/1 as the user clicks...The value should be got in the aspx.vb page from the .aspx file where the message box declared...How?
Posted
Updated 30-Aug-10 2:54am
v3
Comments
demouser743 30-Aug-10 3:26am    
What exactly you need can you tell. On what event you need the message box

It's returned by the message box call, and it's a bool. By front end, do you mean javascript ? That's the front end.
 
Share this answer
 
a simple example

XML
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
    <script language="javascript" type="text/javascript">
        function GetValue()
        {
            if(window.confirm("Are you sure to get the value???"))
            {
                alert("Got confirmation");
            }
            else
            {
                alert("Didn't got confirmation");
            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <input type="button" value="Click Me" onclick="javascript:GetValue();" />
    </div>
    </form>
</body>
</html>


simple isn't ??:cool:

If this post solves your issue please mark it as answer.
 
Share this answer
 
v2
Comments
Dalek Dave 30-Aug-10 11:30am    
Good answer.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900