Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi,

 

does anyone know how to capture a refresh page event in asp.net?

 

e.g. to be able to tell (server side) wheter the user has navigated to the page or has refreshed the page?

 

thanks.

Posted

yeah - its something like that i need, but i dont think the isPostBack works for refreshing the browser.. what i need is a way to distinguish between the user navigating to a page and a user hitting the browser refresh or f5

 

thanks for your help

Posted
yeah - its something like that i need, but i dont think the isPostBack works for refreshing the browser.. what i need is a way to distinguish between the user navigating to a page and a user hitting the browser refresh or f5

 

thanks for your help

 

not really

if I am not mistaken the autopostback is false if a user refreshes.

Posted

Hi,

 

If i have the following code:

 

   Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
       'Put user code to initialize the page here
       If Page.IsPostBack Then
           Response.Write("postback is true")
       Else
           Response.Write("postback is false")
       End If
   End Sub

 

and the page is a simple html page. When it loads first, it displays 'postback is false'

 

when i hit refresh it says 'postback is false'

 

when i navigate to the page (via a link) it says 'postback is false'

 

Am i missing anything or does anyone know another way of doing it?

 

Thanks for your help.

  • 2 weeks later...
Posted

I have the same problem. I have a page with a datagrid. If I dont alter the page and hit "Refresh" it works fine. But if I alter a row and hit "Refresh" it doesn't work. Any ideas?

 

Thanks!

 

Dave

  • 2 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...