hello every one,i have used a stream reader to read a file, but after the compilation i am not able to get the text in the file as it is.for example i am retrieving a .doc file(ex:resume) and when i retrieve the same file using stream reader, the text is not completely displayed.so can anyone send me the code to retrieve a file...
here is my code:
TextBox1.Visibl e = True
Dim fs As New FileStream(Serv er.MapPath("fil es\gandi.doc"), FileMode.Open, FileAccess.Read )
Dim s As New StreamReader(fs )
s.BaseStream.Se ek(0, SeekOrigin.Begi n)
While s.Peek() > -1
TextBox2.Text &= s.ReadLine()
End While
s.Close()
here is my code:
TextBox1.Visibl e = True
Dim fs As New FileStream(Serv er.MapPath("fil es\gandi.doc"), FileMode.Open, FileAccess.Read )
Dim s As New StreamReader(fs )
s.BaseStream.Se ek(0, SeekOrigin.Begi n)
While s.Peek() > -1
TextBox2.Text &= s.ReadLine()
End While
s.Close()
Comment