-5

Possible Duplicate:
Confirmation message box in webapplication

I want create a message box in code behind. My code is here. It doesn't show any message box.Please help me to do this..

Button btn = new Button();
btn.OnClientClick = "return confirm('Your requested leave count exceeds the balance leave count.\n It may count as Loss of pay if your requeset approved by your head...\n \nAre you sure you wish to apply?');";
if (true)
{
  //Do something;
}
else
{
  //do something;
}
Community
  • 1
  • 1
Milton Fernando
  • 125
  • 1
  • 3
  • 10

1 Answers1

2

The returned value will be only available in the client - in javascript - you really should have a javascript function called on the ClientClick event, which will be able to take the return value and send it to your server (possibly using AJAX).

Oded
  • 489,969
  • 99
  • 883
  • 1,009