V
VB Programmer
I want to write a file to the "secured" dir that is on my website. The full
path is: C:\inetpub\wwwroot\MyWebSite\Secured
I tried this, but it didn't work:
Dim strFileName As String = "Secured\MyFile.txt"
Dim sw As New StreamWriter(strFileName)
sw.WriteLine("Testing 1-2-3")
sw.Close()
Response.Redirect(strFileName)
It gives me a System.IO.DirectoryNotFoundException.
Any ideas how I can reference this correctly?
Thanks!
path is: C:\inetpub\wwwroot\MyWebSite\Secured
I tried this, but it didn't work:
Dim strFileName As String = "Secured\MyFile.txt"
Dim sw As New StreamWriter(strFileName)
sw.WriteLine("Testing 1-2-3")
sw.Close()
Response.Redirect(strFileName)
It gives me a System.IO.DirectoryNotFoundException.
Any ideas how I can reference this correctly?
Thanks!