Can't refresh an .aspx page

C

Chumley Walrus

I've been trying to put an automatic 20 second refresh on an .aspx page
(that derives from a mobilewebform in VisualStudio.Net and MMIT), but
none of the below work :

<HEAD>
<NOSCRIPT>
<META HTTP-EQUIV="Refresh" CONTENT="20; URL=main.aspx">
</NOSCRIPT>
</HEAD>
<BODY onload=setTimeout("location.href='main.aspx'",10000)>

----
<meta http-equiv="refresh" content="20">

----
C#
(in private void Page_Load(object sender, System.EventArgs e)
{

if (!Page.IsPostBack)
//{
// PopulateFields();
//}

Response.AppendHeader("Refresh", "20; URL=main.aspx");
}
 
A

Alex

A few obivous suggestions.

Select one option only i.e the following would work (I just checked)

<META HTTP-EQUIV="Refresh" CONTENT="2;url=http://localhost/default.aspx">

Why are you use appendheader. If you want to dynamically add the line then
place a literal control in the page and set it from the page load event.

Other suggestions would be check that you do not have a firewally preventing
pages loading automatically and also that the path is correct.

HTH

Alex
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,740
Latest member
JudsonFrie

Latest Threads

Top