Discussion Locked

How to refresh a ASP page for once?

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I want refresh a ASP page only once when it is loading.How can i do that using ASP or Javascript?

5 replies

by joel m

well, I can think of one ghetto workaround for that...there may be a better waym but I don't know it.

have this ASP code in the page:
-----------------
<%
dim reloaded
reloaded = request.querystring("reloaded")

if reloaded = "" then
%>

<%
end if
%>

-------------------
the point is, that when you first load the page...the "request.querystring" will be empty, thus it'll load a javascript command that replaces the current page with itself and has the querystring equals to "true" (or whatever you want) and thus would not load the replace command.

hope it helps
Joel
jdm.4mg.com

by madhusudan_p

take a session variable
if session variable = intialized value(here it may be zero) //for the first time
{
increment the session variable
response.redirect same page

}

This discussion is closed to new replies.