用户管理双击打开父窗体选项卡,传递不同的ID页面不刷新
页面
user.aspx
前台JS
<script src="./js/default.js" type="text/javascript"></script>
<script type="text/javascript" language="javascript">
function openTab(strID, strUrl, strTitle) {
var basePath = '<%= ResolveUrl("~/") %>';
//parent.addExampleTab.apply(null, ['SysUserAccountEdit', basePath + strUrl, '用户管理', basePath + 'images/filetype/vs_aspx.png', true]);
parent.addExampleTab.apply(null, [strID, basePath + strUrl, strTitle, basePath + 'images/filetype/vs_aspx.png', true]);
}
</script>
后台
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
{
int selectcount = Grid1.SelectedRowIndexArray.Length;
for (int i = 0; i < selectcount; i++)
{
int rowindex = Grid1.SelectedRowIndexArray;
string id = Grid1.Rows[rowindex].DataKeys.GetValue(0).ToString();
PageContext.RegisterStartupScript("openTab('user_view', 'admin/user_view.aspx?id=" + id + @"', '用户管理-查看');");
}
}
|