我拥有response.redirect
一个页面所需的所有代码,并将我需要的信息传递给另一个页面。但我不希望它重定向页面,而是在页面中创建一个弹出窗口。我也有弹出窗口的代码,但我无法将信息传递给它。
这是弹出窗口的代码,它没有传递任何信息:
<asp:LinkButton ID="lb_viewstudenttimetable" runat="server" OnClick="lb_viewstudenttimetable_Click"
OnClientClick="window.open('Timetable_User.aspx','Timetable','width=640,height=360,scrollbars=yes');">
这是OnClick
将信息传递到其他页面的按钮的代码
protected void lb_viewstudenttimetable_Click(object sender, EventArgs e)
{
GridViewRow row = gv_classlist.SelectedRow;
Response.Redirect("Timetable_User.aspx?UserID=" + row.Cells[1].Text + "");
//my attempt of trying to pass the following to the popup
//Response.Write("window.open('Timetable_User.aspx?UserID="+row.Cells[1].Text+"','Timetable','width=640,height=360,scrollbars=yes');");
}
所以我想OnClientClick
用来做那件事OnClick
。