views:

12

answers:

1

Basically I want to take My Client. Then for example Lets say in my client I have "A = 1" Then my 2nd file which has random data in it. So Client= My Client File = The File which I want in the end result

How could I Inject "A = TextBox1.Text" from Client to File. I heard it's called "End Of File" or something like that. Any help please?

A: 

Use System.IO.File in combination with StreamWriter.

File.CreateFile() helps you create files. Check if the following sample helps you (This is not written to solve your exact expectation, but gives you the idea of available options)

Dim fs as new FileStream("YourFile.bin", FileMode.Create)
Dim writer as New BinaryWriter(fs)

For i as Integer = 0 To 10
  writer.Write(CInt(i))
Next

writer.Close()
fs.Close()

FileStream.CreateText() method helps you create a Text stream and you can use this to write your textbox content into file.

SaravananArumugam