views:

70

answers:

2

How can I give alert message with Ok and Cancel button within dataset function. If ok proceed further else return in asp.net.

+4  A: 

OnClientClick="return confirm('Proceed?')"

Jan Jongboom
The return is important. When you hit cancel confirm returns false, which tells ASP.NET not to do the post back function. If you hit OK then the postback function executes. The return is key don't forget to leave it out.
David Basarab
A: 
function someFunction(){
   if(confirm('Proceed ?')){
       // .. action here
   }
}
uji