• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 298
  • Last Modified:

asp 3.0 refresh

I have the following codes, and if it is not 7 then I want  to refresh one time. How can I do that in asp 3.0? Thank you
if CurrentStatusID="7" then 'good to go
   pass=1
else
  pass=0
  asp.refresh ?
end if
0
Webboy2008
Asked:
Webboy2008
  • 4
  • 3
1 Solution
 
aibusinesssolutionsCommented:
The simplest method would be to redirect the page back to itself.

if CurrentStatusID="7" then 'good to go
   pass=1
else
  pass=0
  Response.Redirect('.", False)
end if
0
 
aibusinesssolutionsCommented:
Or if you want an actual browser refresh, you could do something like

if CurrentStatusID="7" then 'good to go
   pass=1
else
  pass=0
  Response.Write("<script>location.reload(true);</script>")
end if

0
 
Webboy2008Author Commented:
Try both, it does not seem working.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
Webboy2008Author Commented:
Sorry: the <script> one is working ok now. But my second issue is
I don't want to refresh forever can I do  that?
if CurrentStatusID="7" then 'good to go
   pass=1
else
  pass=0
  Response.Write("<script>location.reload(true);</script>")
        if refresh process is more than 2 mins Or len(fresh) >= 5  
            response.redirect ("xxx.com")
        end if
end if
0
 
aibusinesssolutionsCommented:
What exactly are you trying to do?  You might want to just include a meta refresh tag in your html if you just want the page to refresh every 10 seconds or so.  You could also set a session cookie with the current time, then check the value on each page load, if 2 minutes pass redirect to another page.
0
 
Webboy2008Author Commented:
It is hard to describe. But is that possible to do what I just asked for?
0
 
aibusinesssolutionsCommented:
if CurrentStatusID="7" then 'good to go
   pass=1
else
    pass=0
  If Session("scheck") Is Nothing Then Session("scheck") = Now()
  If Session("scheck") < Now.AddMinutes(-2) Then    
       Response.redirect ("xxx.com")
  End If
  Response.Write("<script>location.reload(true);</script>")
End if
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now