If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > ASP page not processing on all occasions

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-22-04, 19:49
sib121 sib121 is offline
Registered User
 
Join Date: Apr 2004
Posts: 10
ASP page not processing on all occasions

Hi there

I have an ASP page displaying a users details if they are logged in and allowing them to add new details if not. The problem is it doesnt always seem to process the ASP every time I go to that page. I write to a text file to with debug statements to check its processing the code and its not writing on subsequent entries to the page other than the first.

i.e user is logged in, database is searched for their record and database fields are transferred to vars and used to display their details on the page, they change the details and the same page processes and reads in their updated details via querystring and redisplays their updated record details. Problem is if user navigates away from this page and comes back it displays their original details and does not seem to process any of the ASP at the top of the page, I know this as the debug statements I write to a text file are not getting written.

Can anyone help, this is very frustrating. Its as if the page is not reloading properly or the session variables are not resetting.

thx
__________________
Many Thanks
Siobhan
Reply With Quote
  #2 (permalink)  
Old 04-22-04, 20:05
rokslide rokslide is offline
Registered User
 
Join Date: Nov 2003
Location: Christchurch, New Zealand
Posts: 1,617
sounds like a caching issue... I assume everything gets displayed properly if you force a refresh of the page...
Reply With Quote
  #3 (permalink)  
Old 04-22-04, 21:10
sib121 sib121 is offline
Registered User
 
Join Date: Apr 2004
Posts: 10
Hi, thx for your response...

it does sound like a caching, does that mean its just displaying the original page with original values etc... it only works again if I close down IE completely and restart the application but this wont do for the real site as people can quite validly go navigate around the site and come back to that page.


any ideas ?
__________________
Many Thanks
Siobhan
Reply With Quote
  #4 (permalink)  
Old 04-22-04, 21:20
rokslide rokslide is offline
Registered User
 
Join Date: Nov 2003
Location: Christchurch, New Zealand
Posts: 1,617
Try adding this to the top of your page
Code:
<% Response.CacheControl = "no-cache" %>
<% Response.AddHeader "Pragma", "no-cache" %> 
<% Response.Expires = -1 %>
If that doesn't work, attach a copy of the page and I will have a look at it....
Reply With Quote
  #5 (permalink)  
Old 04-22-04, 21:28
sib121 sib121 is offline
Registered User
 
Join Date: Apr 2004
Posts: 10
WOW I could hug you if you were nearby

thank you so much, that works an absolute treat, is that something one should have on all pages or does it depend on the computer you are running and its settings
__________________
Many Thanks
Siobhan
Reply With Quote
  #6 (permalink)  
Old 04-22-04, 21:34
rokslide rokslide is offline
Registered User
 
Join Date: Nov 2003
Location: Christchurch, New Zealand
Posts: 1,617
it more depends on the page then anything else....

some pages you will never have a problem with due to the way they are processed....

if you want to be sure 100% of the time create an asp include file called headers.asp or something and drop those lines into it and include the headers.asp file in all pages...
Reply With Quote
  #7 (permalink)  
Old 04-22-04, 21:39
sib121 sib121 is offline
Registered User
 
Join Date: Apr 2004
Posts: 10
good idea, will do that

sorry to be a pain but just trying to understand why it would happen on some pages and not others, is it due to how complicated the ASP is for instance ?
__________________
Many Thanks
Siobhan
Reply With Quote
  #8 (permalink)  
Old 04-22-04, 21:52
rokslide rokslide is offline
Registered User
 
Join Date: Nov 2003
Location: Christchurch, New Zealand
Posts: 1,617
nah, I don't think so,... unfortunately it has been so long since I did some serious asp work that I can't remember what will cause some pages to cach and not others... sorry...
Reply With Quote
  #9 (permalink)  
Old 04-22-04, 21:56
sib121 sib121 is offline
Registered User
 
Join Date: Apr 2004
Posts: 10
ok, well thanks again
__________________
Many Thanks
Siobhan
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On