I have a page. If I click a button on this page to perform some operation, I am showing a message after this operation. I want my page should redirect to another page after 5 second automatically.
??????????
I have a page. If I click a button on this page to perform some operation, I am showing a message after this operation. I want my page should redirect to another page after 5 second automatically.
??????????
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Rajendra DeopuraPosted Nov 25, 2008, 6:26 AM
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Thread.Sleep(5000)
Response.Redirect("Default2.aspx")
End Sub
Rahul Kumar SaxenaPosted Nov 25, 2008, 1:42 AM
Hi I got it.......
protected
void btnRedirect_Click(object sender, EventArgs e){
lblMessage.Text = "You Click";
string ToRedirectURL = "Default2.aspx";
Response.AppendHeader("REFRESH", "5;URL=" + ToRedirectURL );
}