Home > Web Front-end > HTML Tutorial > How to automatically refresh the page where the iframe is located after the .aspx page in ifame is submitted through Button_Click. _html/css_WEB-ITnose

How to automatically refresh the page where the iframe is located after the .aspx page in ifame is submitted through Button_Click. _html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:18:35
Original
1312 people have browsed it

iframe, iframe button

There is a treeview plus an iframe in default.aspx
<asp:TreeView ID="TreeView1" runat="server" >                  <Nodes>           <asp:TreeNode Text="物资管理" Value="物资管理" SelectAction="Expand">       </Nodes>                </asp:TreeView><iframe id="iframe1"  width="100%" height="100%"  runat="server"></iframe>
Copy after login

The nodes of this treeview can be bound through background data reading, and the node value is single The Src that controls the iframe. When the Button_Click of a page in the iframe is submitted, the order number in the menu is also increased. The question now is how to refresh the node number in the treeview of this data-bound treeview in the Button_Click event.
Note: It would be best if you can use Ajiax’s UpdatePanel to update asynchronously
!

Reply to the discussion (solution)

In fact, it is submission of the sub-page, refreshing the parent page is

Write a js function on the parent page, for example, the function is called reload (), write a js for page refresh, window.location.href=xxxxxx or the like;
After the sub-page is submitted successfully, just call parent.reload().

Missed. . .

After the sub-page is submitted successfully, call window.parent.reload();

No, the method is wrong

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template