show the data of current page compleatly and ,then after few second I want to Redirect the page to another page

I want to load a page first
after that 
I have to tranfer control to another page only after wating/passing  few seconds.

So I tried the following and failed

 Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.LoadComplete
     showDataOfCurrentPage()
     Dim sleepT As Int64 = 100000
     Threading.Thread.Sleep(sleepT)
     Response.Redirect("URL"))
 End Sub 

I failed because I wrote the sleep code in Page_Load

So I tried it ny writing it on Page_LoadComplete
That too failed .

So in short i want to show the data of current page compleatly
Then after few second I want to Redirect the page to another page

How shuld i code for this?

sujith
0
sujithukvl 2/21/2007 2:00:17 PM
📁 asp.net.getting-started
📃 91979 articles.
⭐ 7 followers.

💬 7 Replies
👁️‍🗨️ 227 Views

<meta http-equiv="Refresh" content="5"; url=http://site.com/page.aspx">

"content" is the number of seconds to wait before the page redirects. 


Regards Mike
[MVP - ASP/ASP.NET]
My site
0
Mikesdotnetting 2/21/2007 2:14:09 PM
it is fine if i get its vb eqallent
0
sujithukvl 2/22/2007 8:19:41 AM

Add the below code inside the <head> tag in your HTML code

<meta http-equiv="Refresh" content="5">

HC


Haissam Abdul Malak
MCAD.NET
| Blog |
0
Haissam 2/22/2007 8:46:25 AM

Add the below code inside the <head> tag in your HTML code

<meta http-equiv="Refresh" content="5" url="pagename.aspx">

HC


Haissam Abdul Malak
MCAD.NET
| Blog |
0
Haissam 2/22/2007 8:47:02 AM

it is fine if i get its vb eqallent

It's not C# - it's an html meta tag.  Just copy and paste it into the <head></head> section of your page. 


Regards Mike
[MVP - ASP/ASP.NET]
My site
0
Mikesdotnetting 2/22/2007 8:50:46 AM

OK thanks

that do work

:) 

0
sujithukvl 2/22/2007 1:38:48 PM

I think we can also do the same

by

 

XXXXXXXX(String TimeBefore  , String PageTo  )
    
        '/*Redirects to to the requested page*/'
        Dim metaData As New HtmlMeta
        metaData.HttpEquiv = "refresh"
        metaData.Content = TimeBefore & ";" & "URL=" & PageTo
        Page.Header.Controls.AddAt(0, metaData)

 

sujith 

0
sujithukvl 3/16/2007 7:07:00 AM
Reply: