Specifically, how we implement asynchronous refresh of files, there are many articles on the Internet to solve this problem, but they use a lot of JavaScript. Since I have low coding skills, there is no high-definition one in it. However, they all seem to use iframes in the solution, which makes me suddenly realize, so I will talk about the idea of using this to refresh.
First of all, there is often more content in an actual page. We temporarily divide it into two areas A and B. Area A is the content area. We can use updatepanel to achieve asynchronous refresh. Area B is the upload area. We use div to occupy ifame. The specific upload function can be put into page C. In this way, when clicking the button to refresh area B, we can pass the value to page C to update the content. Similarly, when we click the button to delete or save the content, we can also obtain the content in page C, which basically satisfies the feeling of no refresh.
In fact, this method cannot be called asynchronous refresh, because we just use iframes to achieve partial refresh of the page to satisfy a feeling of no refresh.
If you handle this, the value transfer between the page and the iframe will become another problem. In fact, if you know this problem, it will be relatively simple, but if you don’t know it, you will have a little no idea.
There may also be many solutions for handling the value transfer on the Internet. I am using JavaScript to get the control and get the value contained in it.
This is to get iframe f1 and the img control in page C
var objFrame = ("f1");
var objPicture = ("imgPicture");
Of course, you can also get the control of the parent page in page C to get the value
var objHid = ("")
This is a div containing ifrmae
<div >
<iframe style="width: 300px; height: 300px" src="" scrolling="no"
frameborder="0" border="0" frameborder="no"></iframe>
</div>
I have successfully used this implementation method in the project. In fact, if you deal with it in this way, the main difficulty is no longer in the implementation of specific functions, but in the adaptation of the page layout under multiple browsers. Of course, the javascript I provide is for multiple browsers.
First of all, there is often more content in an actual page. We temporarily divide it into two areas A and B. Area A is the content area. We can use updatepanel to achieve asynchronous refresh. Area B is the upload area. We use div to occupy ifame. The specific upload function can be put into page C. In this way, when clicking the button to refresh area B, we can pass the value to page C to update the content. Similarly, when we click the button to delete or save the content, we can also obtain the content in page C, which basically satisfies the feeling of no refresh.
In fact, this method cannot be called asynchronous refresh, because we just use iframes to achieve partial refresh of the page to satisfy a feeling of no refresh.
If you handle this, the value transfer between the page and the iframe will become another problem. In fact, if you know this problem, it will be relatively simple, but if you don’t know it, you will have a little no idea.
There may also be many solutions for handling the value transfer on the Internet. I am using JavaScript to get the control and get the value contained in it.
This is to get iframe f1 and the img control in page C
var objFrame = ("f1");
var objPicture = ("imgPicture");
Of course, you can also get the control of the parent page in page C to get the value
var objHid = ("")
This is a div containing ifrmae
<div >
<iframe style="width: 300px; height: 300px" src="" scrolling="no"
frameborder="0" border="0" frameborder="no"></iframe>
</div>
I have successfully used this implementation method in the project. In fact, if you deal with it in this way, the main difficulty is no longer in the implementation of specific functions, but in the adaptation of the page layout under multiple browsers. Of course, the javascript I provide is for multiple browsers.