문제

I am wanting to have a rotating pages in my application and I have found how to redirect to another page. My question is how can incorporate a certain time frame of when to redirect. example to clarify:

if (!IsPostBack)
{
    Response.AppendHeader("PageSwitch", (ConfigurationManager.AppSettings["PageSwitch"]));
    Response.Redirect("test.aspx", true);
}

I was trying to have the page switch off a value I set in my AppSettings in web config that way it can be changed. I have this as a start. I can't turn the AppendHeader into an if statement because of void to bool problems. How can I make this to load the new page after 30 seconds or preferably after my value in AppSettings?

도움이 되었습니까?

해결책

Based on this tutorial, it looks like you want something like:

Response.AddHeader("REFRESH", "30;URL=test.aspx");

Assuming test.aspx is the target and you want the redirection to occur after thirty seconds.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top