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
%>
Hello
<%
Response.write("Earth")
Dim outputData as String
IO.File.WriteAllText(Server.MapPath("output.txt"), buffer.ToString())
%>