为按钮添加对话框

Button1.Attributes.Add("onclick","return confirm(’确认?’)"); 
button.attributes.add("onclick","if(confirm(’are you sure...?’)){return true;}else{return false;}") 

原文地址:https://www.cnblogs.com/wuhuisheng/p/1777253.html