For the "continuous pop-up window in Ajax" problem mentioned earlier, a solution is provided: implement the pop-up window process in front-end Js, the same content window appears each time.
This solution encountered a problem when deployed to the server. The server is IE6 and may be incompatible with the Js in the pop-up window. The content in the pop-up window cannot be loaded.
Therefore, we began to seek a second solution:
Starting from the essential principle, the reason why the same content window is not popped up for the second time is that the code for the background pop-up window call is identical (the same method and method parameters are the same)
If the code in each pop-up window in the background changes, Ajax refresh will occur. Therefore, the background code is executed every time.
Starting from this solution:
Change the method of the pop-up window in the background:
Protected void lnktab_click (Object sender, eventargs E)
{
Session ["childqx"] = 1;
If (id1 = "0 ")
{
Scriptmanager. registerstartupscript (updatepanel1, GetType (), "onclick", "showtab2 ('" + hiddpropid. Value + "')", true );
Id1 = "1 ";
}
Else
{
Scriptmanager. registerstartupscript (updatepanel1, GetType (), "onclick", "showtab3 ('" + hiddpropid. Value + "')", true );
Id1 = "0 ";
}
// Ajaxpanel2.
// Refush ();
}
By switching to call different JS, the window is displayed. Different JS files share the same content, but different names are assigned.
In this way, the code will be refreshed every time the background call occurs, and a window can pop up continuously.
This principle is simplified by using the current time as a parameter. It is more concise:
Protected void lnktab_click (Object sender, eventargs E)
{
Session ["childqx"] = 1;
Scriptmanager. registerstartupscript (updatepanel1, GetType (), "onclick", "showtab2 ('" + hiddpropid. Value + ", 'datetime. Now')", true );
Id1 = "1 ";
}
Each call has different parameter values, so the system refreshes each time and executes the background code.