Click here to Skip to main content
15,904,877 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Can anyone please help me?
How to get the COnfirmation messagebox value in aspx.vb page???
I could add a confirmation messagebox with button1.Add.Attribute() method.If the response is true
label1.text="TRUE" else label1.text="FALSE"
I dono how to get the confirmation value.....plzz help me
Thanks in advance
Posted

to show a "traditional messagebox" look into the javascript alert function

Javascript Alert[^]
 
Share this answer
 
XML
Same way that your are doing using JavaScript.

But Register that function from codbehind using
ClientScript.RegisterStartupScript(this.GetType(), "Confirm",
"<script>Confirm('" + Are You Sure ?+ "');</script>");

or if use ajax in your page then ScriptManager instate of ClientScript


aur else you can use this code also

XML
<asp:button runat="server" id="Button1" onclick="Button1_Click" style="display:none;"  />
...
<script type="text/javascript">
        function callBack(args)
        {
            document.getElementById("Button1").click();
        }
        function openConfirm()
        {
            radconfirm("Are you sure?", callBack);
        }
</script>
 
Share this answer
 
v2
Such a Google question - confirm box from code behind page[^]
 
Share this answer
 
One solution I found is get the Response value in a hidden html control.That works fine...
 
Share this 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