你好,可以通过重载 page 的 render 方法去实现确认框的调用,代码如下:- protected override void Render(HtmlTextWriter writer)
- {
- WebControl updateButton = (WebControl)FpSpread1.FindControl("Update");
- if (updateButton != null)
- {
- updateButton.Attributes.Add("onclick", "var ret = confirm('Are you sure you want to update?'); if(ret){FpSpread1.Update();}");
- }
- base.Render(writer);
- }
复制代码 |