Response.AppendHeader("Refresh", Not working... Ideas?

U

ujjc001

For some reason I can't Response.AppendHeader("Refresh",
Convert.ToString((Session.Timeout * 60) + 60) & "; URL=default.aspx")
to add the tag into the header.

In the source the refresh header is not added to the head tags. Any
ideas?
I've tried in page init, page load, and page prerender.
Thanks.
Jeff
 
H

Hans Kesting

ujjc001 said:
For some reason I can't Response.AppendHeader("Refresh",
Convert.ToString((Session.Timeout * 60) + 60) & "; URL=default.aspx")
to add the tag into the header.

In the source the refresh header is not added to the head tags. Any
ideas?
I've tried in page init, page load, and page prerender.
Thanks.
Jeff

Are you expecting this to show up in the HTML source?
You will not find it there, the HTTP-headers are sent *before* the
HTML text. You can't see them with "view | source".

Try to set the timeout to a lower value than 21 minutes and see if
the refresh does happen after all. (your header should work ok)

Hans Kesting
 

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

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,132
Latest member
TeresaWcq1
Top