No I didn't close the StreamWriter in the code, I left it out along with the
rest of the sub because it's not important. What is important is that when
I set a brakepoint on this line: swWebBidLog = New
System.IO.StreamWriter(..) and do a "step over" the whole page restarts and
page_load is called again.
test() is called from page_load.
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
test()
End Sub
This is the case on two machines at work, but when I tried it at home it
worked.
Shawn
"Michael Ramey" <raterus@localhost> wrote in message
news:eH**************@TK2MSFTNGP09.phx.gbl...
I don't get it, for one you aren't "closing" the StreamWriter in the code
you posted. Just for grins I added a swWebBidLog.Close() at the end of it
all, and it uh closed, then exited. I don't really see what your problem
is. Please post more, especially the sub you are calling "test()" out of,
your probably most likely lies there.
"Shawn" <bo********@hotmail.com> wrote in message
news:40******@news.wineasy.se...
Hi. Can anyone please explain to me why this method "restarts" after the
StreamWriter is created?? Put a brakepoint on the sub and you will see
what I mean. I've tried running it on a different machine and the same thing
happends. I'm running .NET Framework 1.0
Private Sub test()
Dim swWebBidLog As System.IO.StreamWriter
Dim strLogFile As String
strLogFile = Server.MapPath("log.log")
swWebBidLog = New System.IO.StreamWriter(strLogFile, True,
System.Text.Encoding.Default)
End Sub
Thanks,
Shawn