给按钮在后台添加属性 this.Button1.Attributes.Add("onclick","javascript:if(confirm('继续吗?');"){return true;}else{return false;}");