Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > META REFRESH

Reply
Thread Tools

META REFRESH

 
 
=?Utf-8?B?am9lYmxhc3Q=?=
Guest
Posts: n/a
 
      01-30-2006
HI,

Can someone explain to me why the
<meta http-equiv="refresh" content="5"/> will not work for me?

I use it in a standard asp page and it works just fine.
Why in ASP.NET2.0 it doesn't. I don't get any errors, it simply does not
trigger the page_load event after 5 seconds.

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb"
Inherits="_Default" EnableSessionState="True" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>test</title>
<meta http-equiv="refresh" content="5"/>
</head>
<body>
</body>
</html>

CODE

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load
Response.ClearContent()
Response.ClearHeaders()
Response.ContentType = "application/pdf"
Response.WriteFile(Server.MapPath(getPDFName()).To String)
Response.Flush()
Response.Close()
End Sub





 
Reply With Quote
 
 
 
 
=?Utf-8?B?am9lYmxhc3Q=?=
Guest
Posts: n/a
 
      01-30-2006
In fact, It works only if the page is updated with html but as not when the
output is a stream .... I guess I will have to write a callback function?
will it work or it is simply not possible when using stream?

"joeblast" wrote:

> HI,
>
> Can someone explain to me why the
> <meta http-equiv="refresh" content="5"/> will not work for me?
>
> I use it in a standard asp page and it works just fine.
> Why in ASP.NET2.0 it doesn't. I don't get any errors, it simply does not
> trigger the page_load event after 5 seconds.
>
> <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb"
> Inherits="_Default" EnableSessionState="True" %>
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>
> <html xmlns="http://www.w3.org/1999/xhtml" >
> <head runat="server">
> <title>test</title>
> <meta http-equiv="refresh" content="5"/>
> </head>
> <body>
> </body>
> </html>
>
> CODE
>
> Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
> Handles Me.Load
> Response.ClearContent()
> Response.ClearHeaders()
> Response.ContentType = "application/pdf"
> Response.WriteFile(Server.MapPath(getPDFName()).To String)
> Response.Flush()
> Response.Close()
> End Sub
>
>
>
>
>

 
Reply With Quote
 
 
 
 
addup
Guest
Posts: n/a
 
      01-30-2006
because your meta / refresh tag was never sent to the browser

> Response.ClearContent()
> Response.ClearHeaders()
> Response.ContentType = "application/pdf"
> Response.WriteFile(Server.MapPath(getPDFName()).To String)
> Response.Flush()
> Response.Close()


you sent the pdf file in your response, no meta tags

I'm not sure if it will work, but you can try to set refresh 5 in your
http header (AFTER your ClearHeaders, obviously)

g'luck
-- addup --

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Meta-Meta-Programming, revisited Erik Veenstra Ruby 21 07-25-2006 10:26 PM
Meta-Meta-Programming Erik Veenstra Ruby 29 02-08-2006 08:22 PM
Meta methods to govern meta data? Duane Johnson Ruby 6 10-28-2005 03:57 AM
server-side timer vs. meta refresh Jim Hammond ASP .Net 4 10-27-2003 07:30 PM
META NAME and META HTTP-EQUIV Nym Pseudo HTML 1 09-26-2003 09:13 AM



Advertisments