There is an UpdatePanel control in atlas, which supports partial updates. Just specify Mode="Conditional". Of course, the ScriptManager must also set EnablePartialRendering="true".
Partial update, using xmlHttp. The process is as follows:
1: During postback, the js of the page postbacks the data on the page (the entire page must be postbacked)
2: The background receives the request and starts processing (the pageLoad of the page can be triggered)
3: After processing, only send the data to be updated back to the page (determine which part of the data to send back according to the name of the UpdatePanel you want to update. This is the code of this.updatePanelXX.Update())
4: The page (client) only updates this part of the postback data (this is the so-called partial update, the method is to find the updatePanle, and then UpdatePanel.InnerHtml=PostBackData. It is a direct replacement.)
From this point of view, the so-called partial update The new one is to redraw only the specified updatePanel part (when posting back to the server, the entire page must be posted back; the background code will process each one as before; but only part of the processing results will be returned to the client).
In this way, it will be very difficult if you want to trigger js processing of a page while UpdatePanle is processing. Because all the data you post back is updated to a small corner, the previous Response.Write(js) will not work at all.
The solution is this:
this.Page.ClientScript.RegisterStartupScript(this.GetType(), "OpenOverViewPart", openScript); Use the RegisterStartupScript method to register the js function, and then it can be executed smoothly.
In fact, the execution is not so smooth, because after atlas performs partial update, it will put all the js on the page together---mind your own business---so it will cause some small impact: many js have such as <! - and other comment symbols, if you are not careful, your own js will also be commented. This is indeed more troublesome.
The solution is X. You need to control the js output style yourself and add a few more carriage returns to show that it is not a comment.
string openScript = "nt";
openScript = "<script" + " type='text/javascript'>rn"
+ "rn"
+ "var a=0;rn"
+ "opener.top.__doPostBack('" + Request.Params["refresh"] + "','refresh');rn"
+ "window.opener.focus();"
+ "window.close();"
+ "<" + "/script" + ">";