关闭当前页面时调用上一页事件 [英] Calling previous page event when closing current page

查看:84
本文介绍了关闭当前页面时调用上一页事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有一个网页(表格A).

在表单A中,我正在显示带有一些详细信息的gridview,并且表单具有两个按钮.
Button1用于在gridview中显示详细信息.

单击Button2时,将打开一个新页面(表格B),我将在该页面中输入一些值,然后单击一个按钮进行保存.
以上所有都做得很好.

现在我需要的是当我关闭Page2(窗体B)时,新输入的详细信息(在第2页中)应该反映在Page1(FormA)gridview中. 我无法执行此操作.

我该怎么办?
如果有人知道,请答复.

Hi,

I have a webpage (Form A).

In Form A I am displaying a gridview with some details and the form has two buttons.
Button1 is for showing details in the gridview.

When click Button2 a new page (Form B) will be open and I will enter some values in that page and click a button to save.
All the above are done well.

Now what I need is when I close Page2 (Form B) the newly entered details (in page 2) should be reflected in Page1 (FormA) gridview.
I am unable to do this.

How can I do this?
If anybody knows please reply.

推荐答案

您必须在关闭Page2之后重新加载Page1.重新加载Page1时,如果它已成功在数据库中更新,它将获得更新的dat fom数据库.

因此,在保存/关闭page2后,请尝试重新加载页面
You must be reloading the Page1 after closing the Page2. When you will reload Page1 it will get the updated dat fom DB if it updated in DB successfully.

So try to load the page agin after saving/closing the page2


这篇关于关闭当前页面时调用上一页事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆