Solved

Auto reload asp page

Posted on 2004-08-20
2
407 Views
Last Modified: 2008-02-01
Hi experts,

This is going to sound like an odd question, but please bear with me

I have an asp page that for various convoluted, and difficult to change reasons only loads a variable half way down it, (in include files that can only be used once on the page for javascript reasons and are used elsewhere).

Very occasionally I'd like to use that variable at the top of the page.

Currently if i hit f5 and reload the page i the variable is written to a cookie and then loads in fine.

SO... what i'd really like to do is say at the bottom of the page - if condition is x then reload this entire page once automatically once.

Is that possible?
0
Comment
Question by:pjordanna
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 46

Accepted Solution

by:
fritz_the_blank earned 300 total points
ID: 11850760
You could do:

<%
if someCondition then
   response.write("<script>location.replace(""thispage.asp"")</script>")
end if
%>

OR:

<%
if someCondition then
   response.redirect("thispage.asp")
end if
%>

OR:
<%
if someCondition then
  Server.Transfer("thispage.asp")
end if
%>
0
 
LVL 31

Assisted Solution

by:alorentz
alorentz earned 200 total points
ID: 11850762
Sure:

if session("loaded") <> 1 then
   response.redirect "thepagename.asp"
   session("loaded") = 1
end if

That will reload the page when you go to it, once per session.
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

627 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question