473,385 Members | 1,400 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Page1 refresh when Page2 close

Hi, can anyone help me with this.

I have 2 pages, Page 1 is the main page while Page 2 is a flash page. When i close Page 2, I would like page 1 to be refreshed/re-retrieve from database because i need the data in the main page to be updated as data in the database will be changed when i am going through the flash pages.

Page2 is opened when a link in Page1 is clicked

i am using visual studio 2008 VB language

Thanks
Nov 25 '09 #1
1 1949
Frinavale
9,735 Expert Mod 8TB
When you refer to "Page" do you mean Browser Windows?
Is "Page1" the parent browser window to "Page2" (the child browser window)?

You cannot do this using ASP.NET code (by this I mean your VB.NET code). Your VB.NET code runs on the server and it has absolutely no control over what happens with the browser.

You are going to have to use JavaScript for this purpose.

What you need to do (if you're talking about browser windows) is implement a JavaScript method in "Page1" (the parent window) that will postback to the server so that the page can be refreshed.

In "Page2" (the child window) you will have to implement a method that executes when the browser window closes. The only way (that I know of) to check when the window is being closed this is to use the JavaScript onbeforeunload event (this event is not supported by Opera at this time).

So when the onbeforeunload event happens in the child browser, you have to call the JavaScript method that posts back to the server in the parent window. You can use the window.opener to accomplish this.

I've moved your question to the JavaScript forum.

-Frinny
Nov 25 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: NotGiven | last post by:
I have a web page where certain pages have to be opened in a certain order and should only be available when the user openes them in HTTPS. They are all forms and the form action sends you to the...
11
by: Wolfgang Kaml | last post by:
Hello All, I have been working on this for almost a week now and I haven't anything up my sleeves anymore that I could test in addition or change.... Since I am not sure, if this is a Windows...
5
by: yabba | last post by:
2 asp pages From page1 I open a new window... page2. Does page2 know the parent page/wsindow and more inportantly can page2 somehow update the parent page? Something in the form of "<a...
9
by: Targa | last post by:
Ive seen alert scripts triggered by links but I need one that will cover any link or pressing the back/forward buttons. Any such thing? TIA
3
by: Danny | last post by:
HI How can I refresh the main project window in code in ms access 2000 For example, I create a new table, but when I minimize the form, the table is not there until I do F5 (refresh). I do...
2
by: P. Prosper | last post by:
Hello all I have a small webform application with three WebForms that use session variables to maintain session data (user name) When I transfer to page 2 from page1 session state is...
3
by: Agnes | last post by:
In design mode, i didn't see my tab page1 & page2, however, in view code, I see all my textbox object and tab page 1& page2, What's going on ??? I design my form again and again ???? Please help
0
by: viral123 | last post by:
Hi I am using asp.net application on server side. I have two web forms as page1.aspx and page2.aspx how can i make change in page2.aspx Lable by clicking on page1.aspx form button. I really...
7
by: learning | last post by:
Hi! Here's my situation: I created a temporary table TEMP1 in PAGE1.PHP and inserted a few rows. Before I left PAGE1.PHP i tried "SELECT * FROM TEMP1" and echoed the rows and surely there they...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.