can i rite it like this????
'Show the Save dialog and if the user clicks the Save button,
'save the file
If SaveFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then
Try
'Save the file name
strFileName = SaveDialog1.FileName
Dim filePath As String
Dim txtFile.Text As String
'Open or Create the file
filePath = System.IO.Path.Combine( _
My.Computer.FileSystem.SpecialDirectories.MyDocume nts, _
strFileName)
'Replace the contents of the file
My.Computer.FileSystem.WriteAllText(filePath, txtFile.Text, False)
Catch ex As Exception
End Try
My.Computer.FileSystem.WriteAllText("C:\Test.txt", "Text", True)
End If
End Sub
but it has errror because the "txtFile.Text" cannot be declare...how to declare this "txt.File.Text" ???
|