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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Rahul Kumar SaxenaRank #36 · 36.5K reputationPosted Nov 24, 2008, 8:42 PM EST
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 );
}
Rajendra Deopura139 reputationPosted Nov 25, 2008, 1:26 AM EST
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