Click here to Skip to main content
15,894,010 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hii,,


i am stuck in simple code.guys just tell me i want to display the confirmbox when i have some value in hiddenfield and i have display the confirmbox successfully but the problem is if user click the cancel button then i have to stop the process or ""if user click on OK button so i want to run code for salary calculation so how can i do this"".

tell me as soon as possible b'cz my projet deadline is after couple of day and so it must to complted today..
Posted

1 solution

Assuming you want to answer javascript
JavaScript
var result=confirm("Confirmation messsage goes here");
if(result)
 alert("user press ok");
else
 alert("user press cancel");


for c# winform
C#
if (MessageBox.Show("Confirmation messsage goes here", "Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1) == DialogResult.Yes)
                return true;
            else
                return false;

hope you may got idea, and it will help you.
 
Share this answer
 
v3
Comments
Ankur Ramanuj 22-Mar-13 7:30am    
i am working in c#.net(framework 3.5) so messagebox is not working in it.
Ankur Ramanuj 22-Mar-13 7:31am    
And i want to perform the calculation code if user click OK button otherwise it may be stop .
Nasir M@hmood 22-Mar-13 7:36am    
are you working asp.net kindly post your code.

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