|
There are two pages,
1.user_list.aspx.cs
2.user_info.aspx.cs
In the first page, I added an increase button. The code is as follows:
private void btn_Add_Click (object sender, System.EventArgs e)
{
Page.RegisterStartupScript ("ShowWindow", "<script> javascript: window.showModalDialog ('user_info.aspx', '_ blank', 'scroll: 0; status: 0; help: 0; dialogWidth: 290px; dialogHeight: 165px') </ script> ");
}
On the second page, I wrote:
Response.Write ("<script language = 'javascript'> window.dialogArguments.location.reload (true); alert ('Successfully added employees!'); Window.close (); </ script>");
But when you click the add button on the first page, the second page pops up. When you click the "Save" button on the second page, the first page cannot be refreshed, and the second page will not close. The "Cancel" button on the two pages cannot be closed. The closing code is as follows:
private void ImageButton2_Click (object sender, System.Web.UI.ImageClickEventArgs e)
{
Response.Write ("<script language: javascript> javascript: window.close (); </ script>");
}
Please frighten and give thanks, kneeling thank you!
I would like to ask a small question, how to verify the control pop-up dialog dialog box, thank you. |
|