Webboy2008
asked on
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
if CurrentStatusID="7" then 'good to go
pass=1
else
pass=0
asp.refresh ?
end if
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>lo cation.rel oad(true); </script>" )
end if
if CurrentStatusID="7" then 'good to go
pass=1
else
pass=0
Response.Write("<script>lo
end if
ASKER
Try both, it does not seem working.
ASKER
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>lo cation.rel oad(true); </script>" )
if refresh process is more than 2 mins Or len(fresh) >= 5
response.redirect ("xxx.com")
end if
end if
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>lo
if refresh process is more than 2 mins Or len(fresh) >= 5
response.redirect ("xxx.com")
end if
end if
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.
ASKER
It is hard to describe. But is that possible to do what I just asked for?
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>lo cation.rel oad(true); </script>" )
End if
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>lo
End if
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
if CurrentStatusID="7" then 'good to go
pass=1
else
pass=0
Response.Redirect('.", False)
end if