P
Paul Evans
Hi,
Can anyone help me?
I have two text boxes, one single-line and one multiline.
I wish to save the text within the multiline textbox as a txt file,
with a file name by the text in the single-line textbox.
Does that make sense?
If the single-line textbox is 'helpme', I wish to create a txt file of the
multiline textbox called helpme.txt
I have found cound so far as follows, but this only adds text from a textbox
to an existing file.
<%@ Import Namespace="System.IO" %>
<Script Runat="Server">
Sub Button_Click( s As Object, e As EventArgs )
Dim objStreamWriter As StreamWriter
objStreamWriter = File.CreateText( MapPath( "myFile.txt" ) )
objStreamWriter.WriteLine( txtInput.Text )
objStreamWriter.Close
End Sub
</Script>
Can anyone help please?
Paul Evans
Can anyone help me?
I have two text boxes, one single-line and one multiline.
I wish to save the text within the multiline textbox as a txt file,
with a file name by the text in the single-line textbox.
Does that make sense?
If the single-line textbox is 'helpme', I wish to create a txt file of the
multiline textbox called helpme.txt
I have found cound so far as follows, but this only adds text from a textbox
to an existing file.
<%@ Import Namespace="System.IO" %>
<Script Runat="Server">
Sub Button_Click( s As Object, e As EventArgs )
Dim objStreamWriter As StreamWriter
objStreamWriter = File.CreateText( MapPath( "myFile.txt" ) )
objStreamWriter.WriteLine( txtInput.Text )
objStreamWriter.Close
End Sub
</Script>
Can anyone help please?
Paul Evans