Is there a way to keep the StreamWriter open?
- From: "Bishop" <nospam@xxxxxxxxxx>
- Date: Tue, 16 Jun 2009 17:36:36 -0500
Here is my current code:
Imports System.IO
Partial Class _Default
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim FILENAME As String = "C:\inetpub\wwwroot\zzJunkWriteTextFile\Log\output.csv"
Dim objStreamWriter As StreamWriter
objStreamWriter = File.AppendText(FILENAME)
objStreamWriter.WriteLine(Request.RawUrl & "," & DateTime.Now.ToString())
objStreamWriter.Close()
End Sub
End Class
Every time some hits this page it writes a line to a text file. I wanted to find out if I can keep the StreamWriter open to speed up the process?
.
- Follow-Ups:
- Re: Is there a way to keep the StreamWriter open?
- From: Gregory A. Beamer
- RE: Is there a way to keep the StreamWriter open?
- From: John Beschler
- Re: Is there a way to keep the StreamWriter open?
- From: joteke
- Re: Is there a way to keep the StreamWriter open?
- From: Patrice
- Re: Is there a way to keep the StreamWriter open?
- Prev by Date: Re: Is there a way to convert ms sql 2008 tables to XML files?
- Next by Date: Re: Is there a way to convert ms sql 2008 tables to XML files?
- Previous by thread: Formview hijinks
- Next by thread: Re: Is there a way to keep the StreamWriter open?
- Index(es):
Relevant Pages
|