可能重复:
Web应用程序中的确认消息框
我想在后面的代码中创建一个消息框。我的代码在这里。它没有显示任何消息框。请帮我这样做..
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;
}