4 Replies - 2515 Views - Last Post: 17 April 2010 - 11:11 PM Rate Topic: -----

#1 frieling  Icon User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 34
  • Joined: 27-February 09

C#. Download file and display into textbox

Posted 17 April 2010 - 06:50 PM

Okay, Well i know how to download a file from a web server. Say that file is a text file, after it is downloaded, how can i display the files contents into that textbox?

Ideas?
Is This A Good Question/Topic? 0
  • +

Replies To: C#. Download file and display into textbox

#2 [email protected]  Icon User is offline

  • JMP *0x0(%RIP)
  • member icon

Reputation: 37
  • View blog
  • Posts: 1,019
  • Joined: 20-February 09

Re: C#. Download file and display into textbox

Posted 17 April 2010 - 10:16 PM

Read it from stream reader is one way.
another is to loop all the line in the file and add them to the text box
Was This Post Helpful? 0
  • +
  • -

#3 ParagonDevx  Icon User is offline

  • New D.I.C Head

Reputation: 4
  • View blog
  • Posts: 17
  • Joined: 09-April 10

Re: C#. Download file and display into textbox

Posted 17 April 2010 - 10:20 PM

Check this out:
http://www.homeandle...harp_s11p1.html

This post has been edited by ParagonDevx: 17 April 2010 - 10:21 PM

Was This Post Helpful? 0
  • +
  • -

#4 PsychoCoder  Icon User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1659
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

Re: C#. Download file and display into textbox

Posted 17 April 2010 - 10:30 PM

Another option would be to use the WebClient Class to download the file (particularly the WebClient.DownloadFile method.

Once you try that if you run into problems post the code you're trying and we'll do our best to help resolve them, but we're not going to just give you the code for it :)
Was This Post Helpful? 0
  • +
  • -

#5 frieling  Icon User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 34
  • Joined: 27-February 09

Re: C#. Download file and display into textbox

Posted 17 April 2010 - 11:11 PM

I was thinking about using the streamreader. I will try it tomarrow. Also, one more question. Is it possible to test a FTP connection without uploadinga file. This is all in c# coding
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1