Detecting a Web Page Refresh?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top