How to redirect to another page after definite seconds in Asp.Net by using HtmlMeta class?

 Posted by Vishalneeraj-24503 on 5/16/2015 | Category: ASP.NET Interview questions | Views: 245 | Points: 40
Answer:

Write below code:-
using System.Web.UI.HtmlControls;

HtmlMeta meta = new HtmlMeta();
meta.HttpEquiv = "Refresh";
meta.Content = "10;url=profile.aspx";
this.Page.Controls.Add(meta);
Label1.Text = "You will now be redirected in 10 seconds";


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response