473,387 Members | 1,628 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

how to read the data using streamreader

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.Visible = True
Dim fs As New FileStream(Server.MapPath("files\gandi.doc"), FileMode.Open, FileAccess.Read)
Dim s As New StreamReader(fs)
s.BaseStream.Seek(0, SeekOrigin.Begin)
While s.Peek() > -1
TextBox2.Text &= s.ReadLine()

End While
s.Close()
Oct 7 '06 #1
0 1334

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: GB | last post by:
Hi Everybody! I have 2 different processes/application. One is writing to a file and another is reading from it. For some reason the code doesnt seems to work and gives mscorlib.dll IOException...
14
by: Mark Broadbent | last post by:
Does anybody know what is (factual please -not just guess) the quickest method to read data from a file? I am not interested in the format of the data (i.e. blocks, bytes, string etc) just that the...
7
by: [ F e r n a n d o L o p e s ] | last post by:
Hello ALL, I need to read data from a .txt file and save this data in a sql server database table. The .txt file format like this: -----------------------------------------------------------...
10
by: Tibby | last post by:
I need to read/write not only text files, but binary as well. It seems like on binary files, it doesn't right the last 10% of the file. -- Thanks --- Outgoing mail is certified Virus...
4
by: Josema | last post by:
Hi to all, Im searching a hand to solve an Exception that i get when i try to give the user to a gmail account... Any help would be appreciated.. Thanks in advance This is a piece of my...
0
by: Al Wilkerson | last post by:
Hey, Has anyone ever got a "Unable to read data from transport connected" message after reading data from a streamreader composed of a networkstream. For example: Server TcpListener...
2
by: White Spirit | last post by:
I have a function within an application where a client connected to a server continuously sends data. The code on the server side is of the following form: Socket socket = receiveSocket;...
3
by: Learning.Net | last post by:
How to read a Unicode data saved as ASCII in notepad file as txt ? I tried using streamReader but it is not showing Unicode data. eg. using (StreamReader sr = new StreamReader(test.txt) {...
0
by: vishnu | last post by:
Hi, Am trying to post the data over https and am getting error in httpwebresponse.getResponseStream.Please help me to get rid of this issue. Here is the message from immediate window ...
5
by: dm3281 | last post by:
Hello, I have a text report from a mainframe that I need to parse. The report has about a 2580 byte header that contains binary information (garbage for the most part); although there are a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.