是这样的,在aspx页面的里有一个DataGrid绑定了数据库中的两个字段:自动编号和内容,同时我又自己添加了一个按钮列,页面完成。
后台cs代码中的ItemCommand里面写了点击按钮弹出子窗口的代码:Response.Write("<script>window.open('abc.aspx')</script>"); 子窗口abc.aspx用来显示所点击行的具体内容。但是子窗体abc.aspx是根据所点击行的自动编号来判断显示相关内容的,不知道如何将父窗口的自动编号传给abc.aspx来判断显示?请教。
后台cs代码中的ItemCommand里面写了点击按钮弹出子窗口的代码:Response.Write("<script>window.open('abc.aspx')</script>"); 子窗口abc.aspx用来显示所点击行的具体内容。但是子窗体abc.aspx是根据所点击行的自动编号来判断显示相关内容的,不知道如何将父窗口的自动编号传给abc.aspx来判断显示?请教。
{
if(e.Item.ItemType==ListItemType.Item||e.Item.ItemType==ListItemType.AlternatingItem)
{
string NavigaterUrl = PargetUrl+"?id="+e.Item.Cells[3].Text+"&zyid="+e.Item.Cells[11].Text+"&MainProID="+e.Item.Cells[9].Text+
"&MainProjectName="+Server.UrlEncode(e.Item.Cells[8].Text)+"&MainBulidUnit="+Server.UrlEncode(e.Item.Cells[1].Text);//注意
e.Item.Attributes.Add("onmouseover","this.bgColor='#ffefe5'");
e.Item.Attributes.Add("onmouseout","this.bgColor='#ffffff'");
e.Item.Cells[0].Attributes.Add("onclick","javascript:show()");
e.Item.Attributes.Add("onclick","javascript:showbig()");
e.Item.Attributes.Add("onclick","javascript:window.open('"+NavigaterUrl+"','MainFrameSetMain'),this.bgColor='#C1D2EE'");//注意
}
}
}
string str = "<script>window.open('abc.aspx"+index+"')</script>"
Response.Write(str);