c# - show source code of ftp site in richTextBox -


i want show source code of ftp site using c# in richtextbox. in browser like

4/13/12 4:52:00 pm 4/13/12 4:54:00 pm 9/2/10 12:00:00 4/13/12 4:46:00 pm 5/8/12 9:13:00 3/7/09 12:00:00 

but when saw in richtextbox :

apr 13 16:52 apr 13 16:54 sep  2  2010 apr 13 16:46 may  8 09:13 mar  7  2009 

i want show data viewed in browser.

my code :

string url="ftp://ftp.something.com/" ftpwebrequest req; req = (ftpwebrequest)webrequest.create(url);                         ftpwebresponse res = (ftpwebresponse)req.getresponse();             streamreader sr = new streamreader(res.getresponsestream());             richtextbox1.text = sr.readtoend(); 

i don't know wrong due in lines year not time , in time not year.

before send request , response, add method request better/more details. try:

req.method = webrequestmethods.ftp.listdirectorydetails; 

or

req.method = webrequestmethods.ftp.listdirectory; 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -