parent.aspx
<asp:TemplateField HeaderText="配置">
<ItemStyle CssClass="gridView-item-align-l" />
<HeaderStyle CssClass="gridView-Item-head" />
<ItemTemplate>
<%--<asp:LinkButton runat="server" ID="lnkConfig" Text="配置"></asp:LinkButton>--%>
<asp:HyperLink ID="hlConfig" NavigateUrl='<%# Eval("CONFIG_SEQ","SystemConfigDetail.aspx?CONFIG_SEQ={0}")%>' runat="server">配置</asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
***************************************
parent.aspx.cs
HyperLink hlConfig = e.Row.FindControl("hlConfig") as HyperLink;
if (hlConfig != null)
{
string fea="dialogHeight:280px;dialogWidth:540px;status:no;";
hlConfig.Attributes.Add("onclick", "var returnValue =window.showModalDialog('" + hlConfig.NavigateUrl + "',null,'" + fea + "') ;if(returnValue == 'tag_save'){location.href='SystemConfig.aspx';}");
hlConfig.NavigateUrl = "#";
}
*****************************************
SystemConfigDetail.aspx
<base target="_self" />
<img style="cursor: hand" src="../images/button_close.gif" οnclick="window.close()" alt="" />
****************************
SystemConfigDetail.aspx.cs
if (result == 1)
this.WriteOprLog("系统配置", this.UserID + strOprType + "配置成功!操作的配置记录号为" + CONFIG_SEQ);
string message = "<script>alert('设置参数成功,请继续!');window.returnValue='tag_save';window.close();</script>";
Page.RegisterStartupScript("closeMe", message);