.NETGURU
Display a file in Browser
Messages   Related Types
This message was discovered on ASPFriends.com 'ngfx-io' list.


Tarapareddy, Sai
Hi,
I am trying to Display a text file in a browser ..? Which is better way...?

When I tried using the following way it is taking forever to load the file.

sr = System.IO.File.OpenText(strFileNm)
' Read each line in the file.
' When the end of the file is reached, return the value "-1".
Dim x As String
While sr.Peek <> -1
x = x & sr.ReadLine()
End While
txtLog.Text = x

One more question is which control is the better way to display a file....?
Here I am using Textbox....

Thank You,

Sai Krishna Tarapareddy
Data management
x58051
Click here to reveal e-mail address <mailto:Click here to reveal e-mail address>

***********************************************************************************
WARNING: All e-mail sent to and from this address will be received or
otherwise recorded by the A.G. Edwards corporate e-mail system and is
subject to archival, monitoring or review by, and/or disclosure to,
someone other than the recipient.
************************************************************************************
Reply to this message...
 
    
Peter Brunone
Sai,

Instead of ReadLine(), try using the ReadToEnd() method. You won't have
to loop, since the method returns the entire file from current position to
end.

Cheers,

Peter
-----Original Message-----
From: Tarapareddy, Sai [mailto:Click here to reveal e-mail address]
Sent: Tuesday, May 07, 2002 2:11 PM
To: ngfx-io
Subject: [ngfx-io] Display a file in Browser

Hi,

I am trying to Display a text file in a browser ..? Which is better
way...?

When I tried using the following way it is taking forever to load the
file.

sr = System.IO.File.OpenText(strFileNm)

' Read each line in the file.

' When the end of the file is reached, return the value "-1".

Dim x As String

While sr.Peek <> -1

x = x & sr.ReadLine()

End While

txtLog.Text = x

One more question is which control is the better way to display a
file....? Here I am using Textbox....

Thank You,

Sai Krishna Tarapareddy

Data management

x58051

Click here to reveal e-mail address

****************************************************************************
*******
WARNING: All e-mail sent to and from this address will be received or
otherwise recorded by the A.G. Edwards corporate e-mail system and is
subject to archival, monitoring or review by, and/or disclosure to,
someone other than the recipient.

****************************************************************************
********
| [ngfx-io] member Click here to reveal e-mail address = YOUR ID |
http://www.aspfriends.com/aspfriends/ngfx-io.asp = JOIN/QUIT
Reply to this message...
 
    
Tarapareddy, Sai
Hi,
How to give permissions to IUSER_Machine on a file or folder on remote
server...?

Thank You,

Sai Krishna Tarapareddy
Data management
x58051
Click here to reveal e-mail address <mailto:Click here to reveal e-mail address>

-----Original Message-----
From: Peter Brunone [mailto:Click here to reveal e-mail address]
Sent: Tuesday, May 07, 2002 6:03 PM
To: ngfx-io
Subject: [ngfx-io] RE: Display a file in Browser

Sai,

Instead of ReadLine(), try using the ReadToEnd() method. You won't have
to loop, since the method returns the entire file from current position to
end.

Cheers,

Peter
-----Original Message-----
From: Tarapareddy, Sai [mailto:Click here to reveal e-mail address]
Sent: Tuesday, May 07, 2002 2:11 PM
To: ngfx-io
Subject: [ngfx-io] Display a file in Browser
Hi,
I am trying to Display a text file in a browser ..? Which is better way...?

When I tried using the following way it is taking forever to load the file.

sr = System.IO.File.OpenText(strFileNm)
' Read each line in the file.
' When the end of the file is reached, return the value "-1".
Dim x As String
While sr.Peek <> -1
x = x & sr.ReadLine()
End While
txtLog.Text = x

One more question is which control is the better way to display a file....?
Here I am using Textbox....

Thank You,

Sai Krishna Tarapareddy
Data management
x58051
Click here to reveal e-mail address <mailto:Click here to reveal e-mail address>

****************************************************************************
*******
WARNING: All e-mail sent to and from this address will be received or
otherwise recorded by the A.G. Edwards corporate e-mail system and is
subject to archival, monitoring or review by, and/or disclosure to,
someone other than the recipient.
****************************************************************************
********
| [ngfx-io] member Click here to reveal e-mail address = YOUR ID |
http://www.aspfriends.com/aspfriends/ngfx-io.asp = JOIN/QUIT
| [ngfx-io] member Click here to reveal e-mail address = YOUR ID |
http://www.aspfriends.com/aspfriends/ngfx-io.asp = JOIN/QUIT
Reply to this message...
 
 
System.IO.File




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification