ページに必要なすべてのコードがあり、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
です。