代码如下:
protected void btnAdd_Click(object sender, EventArgs e) { try { if (tvTree.SelectedNodes.Count == 0) { throw new Exception("请选择需要操作的节点"); } string sCategory = tvTree.SelectedNode.Category; string sID = tvTree.SelectedNode.Value; string sNM = tvTree.SelectedNode.Text; if (sCategory == "proj") { pYear.Style.Add("display", ""); PStage.Style.Add("display", "none"); } else if (sCategory == "projYear") { pYear.Style.Add("display", "none"); PStage.Style.Add("display", ""); } else if (sCategory == "projStage") throw new Exception("请选择项目年度!"); ClearCtrlInfo(); } catch (Exception ex) { RadAjaxManager1.Alert(ex.Message); } } 其中 throw new Exception("数据保存成功!") 输出方式要改成 this.Page.ClientScript.RegisterStartupScript(this.Page.GetType(),"myScript","<script>ymPrompt.confirmInfo('信息确认框功能测试',null,null,null,handler)</script> ");
这种 只改输出方式。
要怎么把数据保存成功加到上面那段代码中去