1.js代码
function DoAdd() { var strUrl = "add.aspx?rnd=" + Math.random().toString(); var opts = "dialogheight:280px;dialogwidth:500px;resizable:yes;scroll:yes;status:yes;help=no;Maximize=no;"; var rtn = window.showModalDialog(strUrl, window, opts); if (rtn) { document.getElementById("hidCommType").value = "refresh"; form1.submit(); } }
2.cs代码
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { BindGrid(); } else { switch (hidCommType.Value) { case "refresh": BindGrid(); break; } hidCommType.Value = ""; } }
时间: 2024-10-25 00:05:24