G Guest Feb 12, 2006 #1 I need to create a temporary file on a server. How do I do it? I tried using IO.Path but it created a local file; i.e., file://C:...... Click to expand... Depending on how large the file is... you can also use a memorystream.
I need to create a temporary file on a server. How do I do it? I tried using IO.Path but it created a local file; i.e., file://C:...... Click to expand... Depending on how large the file is... you can also use a memorystream.
L lwoods Feb 12, 2006 #2 I need to create a temporary file on a server. How do I do it? I tried using IO.Path but it created a local file; i.e., file://C:...... TIA, lwoods
I need to create a temporary file on a server. How do I do it? I tried using IO.Path but it created a local file; i.e., file://C:...... TIA, lwoods
T Terry Burns Feb 12, 2006 #3 Here is an example. Dim filePath As String = Server.MapPath(ArticleStorage) & "\Art" & txtArticleID.Text & "\" & "Art" & txtArticleID.Text & ".html" If System.IO.File.Exists(filePath) Then System.IO.File.Delete(filePath) End If ' Create an instance of StreamWriter to write text to a file. Dim sw As System.IO.StreamWriter = New System.IO.StreamWriter(filePath) Dim hWriter As System.Web.UI.HtmlTextWriter hWriter = New System.Web.UI.HtmlTextWriter(sw) '// Continiue to write and then close it.
Here is an example. Dim filePath As String = Server.MapPath(ArticleStorage) & "\Art" & txtArticleID.Text & "\" & "Art" & txtArticleID.Text & ".html" If System.IO.File.Exists(filePath) Then System.IO.File.Delete(filePath) End If ' Create an instance of StreamWriter to write text to a file. Dim sw As System.IO.StreamWriter = New System.IO.StreamWriter(filePath) Dim hWriter As System.Web.UI.HtmlTextWriter hWriter = New System.Web.UI.HtmlTextWriter(sw) '// Continiue to write and then close it.
L lwoods Feb 12, 2006 #4 Thanks, Terry... Terry Burns said: Here is an example. Dim filePath As String = Server.MapPath(ArticleStorage) & "\Art" & txtArticleID.Text & "\" & "Art" & txtArticleID.Text & ".html" If System.IO.File.Exists(filePath) Then System.IO.File.Delete(filePath) End If ' Create an instance of StreamWriter to write text to a file. Dim sw As System.IO.StreamWriter = New System.IO.StreamWriter(filePath) Dim hWriter As System.Web.UI.HtmlTextWriter hWriter = New System.Web.UI.HtmlTextWriter(sw) '// Continiue to write and then close it. Click to expand...
Thanks, Terry... Terry Burns said: Here is an example. Dim filePath As String = Server.MapPath(ArticleStorage) & "\Art" & txtArticleID.Text & "\" & "Art" & txtArticleID.Text & ".html" If System.IO.File.Exists(filePath) Then System.IO.File.Delete(filePath) End If ' Create an instance of StreamWriter to write text to a file. Dim sw As System.IO.StreamWriter = New System.IO.StreamWriter(filePath) Dim hWriter As System.Web.UI.HtmlTextWriter hWriter = New System.Web.UI.HtmlTextWriter(sw) '// Continiue to write and then close it. Click to expand...
G Guest Feb 13, 2006 #6 I don't see why not. It should only take a minute to try it, no? If that doesn't work, use ToArray to convert it to a byte array and store that. Peter -- Co-founder, Eggheadcafe.com developer portal: http://www.eggheadcafe.com UnBlog: http://petesbloggerama.blogspot.com
I don't see why not. It should only take a minute to try it, no? If that doesn't work, use ToArray to convert it to a byte array and store that. Peter -- Co-founder, Eggheadcafe.com developer portal: http://www.eggheadcafe.com UnBlog: http://petesbloggerama.blogspot.com