Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Determine if Page Refreshed

Thread Tools

Determine if Page Refreshed

Posts: n/a
First I would question why you want to do this. If they
get to the page by any means it should respond
appropriately, whether refresh or by link. This is a
stateless environment after all.

That being said...

I would take the approach of setting a session variable
that gets set the first time they hit the page:

if session("NotTheFirstTime") = "" then
'write the onload
session("NotTheFirstTime") = true
end if

then based on that variable write or don't write the

Of course, if the user can access the page from multiple
links and the onload is valid for each link, regardless of
how many times they hit the page, this won't work.

>-----Original Message-----
>Is there a way to determine if a page is loading from a
>refresh (either by a page timeout or clicking the refresh
>button) vs. directly loading the page from a link. I
>want to perform an onLoad event in the page only if it
>was directly linked to; not if the page is being

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Previous(Unwanted) event handled when page refreshed by key F5 sanjay patil via .NET 247 ASP .Net 0 04-27-2004 04:02 AM
Help?? The page cannot be refreshed without resending ... Bill Cohagan ASP .Net 4 12-05-2003 01:46 AM
the page cannot be refreshed without resending the informatiion Mr. x ASP .Net 3 09-03-2003 03:31 PM
neiwbie help: Storing form values when page is refreshed abdul bari ASP .Net 1 08-29-2003 03:00 PM
Page not refreshed when DropDownList is opened Alfons Puig ASP .Net 0 08-28-2003 03:36 PM