Get All Content from Output Buffer RRS feed

  • Question

  • User2035351157 posted

    I want to take everything in the output buffer and write it to a file.

    My code below creates a file but the file only contains the word "True" instead of containing the content from the output buffer.  

    It should contain: "Hello Earth" instead of "True".

    How can I write the content that is output to the browser to the file?

    <%@ Page Language="VB" AutoEventWireup="false" %>
    Response.BufferOutput = true
    Dim outputData as String
    IO.File.WriteAllText(Server.MapPath("output.txt"), buffer.ToString())

    Wednesday, November 14, 2012 12:58 PM

All replies