473,387 Members | 1,791 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,387 software developers and data experts.

Detecting a Web Page Refresh?

Hello. I have developed a VB.NET 2005 web site using .NET Framework 2.0.
Does anyone know if there is a way for me to detect when a particular page
has been refreshed by means of clicking the refresh button only?

In the brief research I've done, I found the following code:
AddHandler System.ComponentModel.TypeDescriptor.Refreshed, AddressOf
OnRefreshed

I added a corresponding OnRefreshed delegate function. This must not be
what I'm looking for because it just doesn't work. It doesn't generate any
errors, but the OnRefreshed event never fires. It could very well be that I
just don't know what I'm doing. :)

Any ideas? Need more info?

Thanks,
John
Jun 26 '06 #1
1 1742
Pretty sure what your referring to is about releasing .net cache
dependencies, and has nothing to do with web page refreshes......I could be
wrong (it happens....lol)

Web pages are stateless by their nature - the only way to really check if a
page has been delivered already (and thus the request is a refresh)is to
record a flag somewhere like the session object and check it before
(re)delivering the page.

--
Regards

John Timney (MVP)
"JohnJohn" <Jo******@discussions.microsoft.com> wrote in message
news:5A**********************************@microsof t.com...
Hello. I have developed a VB.NET 2005 web site using .NET Framework 2.0.
Does anyone know if there is a way for me to detect when a particular page
has been refreshed by means of clicking the refresh button only?

In the brief research I've done, I found the following code:
AddHandler System.ComponentModel.TypeDescriptor.Refreshed, AddressOf
OnRefreshed

I added a corresponding OnRefreshed delegate function. This must not be
what I'm looking for because it just doesn't work. It doesn't generate
any
errors, but the OnRefreshed event never fires. It could very well be that
I
just don't know what I'm doing. :)

Any ideas? Need more info?

Thanks,
John

Jun 26 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: RootShell | last post by:
Hello I need to have a way to check if the user as refreshed the current page. Is there any way in PHP to do this? Here's the full facts, I have a JavaScript running that is merely a 30...
25
by: Ryan Stewart | last post by:
I'm working on a project to collect web application usage statistics. What are the recommended ways of detecting whether a browser is JavaScript enabled and/or capable? Obviously I can write a...
6
by: Astra | last post by:
Hi All I want to print a message on the first page if a client's browser doesn't have JavaScript enabled. To do this I used the following code: <% ' create an instance of the Browser...
3
by: Dag Sunde | last post by:
Is there a way to detect if the reason an onUnload() handler was called originated from the user explicitly refreshed the page(s)? Ie. pressed "Ctrl-R", "F5" or klicked the refresh button in...
3
by: Austin Rathe | last post by:
Dear All, I need to be able to detect, server side, if the client machine using my ASP.NET web app supports Javascript. I know there are browser object properties that tell me if the client...
5
by: Russell | last post by:
Hi all, I have a web page(a) that has a link to another web page(b). Now, on the page load event of web page(b), I am doing the following: Response.redirect("./test.pdf") This pdf, if the...
9
by: SHarris | last post by:
Hello, In our new intranet ASP.NET project, two requirements are that the browser accept cookies AND JavaScript. We are requiring the use of Internet Explorer 6+. 1. Using C# in an ASP.NET...
0
by: ratnakarp | last post by:
Hi, I have a.aspx page, which contains few buttons. On clicking one of the button, opens b.aspx. I have a button in b.aspx, on clicking, it closes the b.aspx and refreshes a.aspx. I'm able to...
7
by: Mike | last post by:
Hi. How can I detect if a user's session has timed-out? I'd like to be able to redirect the user to a specified page in the event of session timeout. Thanks!
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.