<%@ Page Language="vb" %> <html> <head> <title>Clearing buffered output in ASP.NET</title> <script runat="server"> Sub Page_Load() Response.AppendHeader("Content-Type", "text/xml") Response.ClearHeaders() myMessage.Text = Response.ContentType End Sub </script> </head> <body> <asp:label id="myMessage" runat="server"/> </body> </html>