roopa
posted
1 posts
since
Nov 05, 2009
from
|
|
Re: Upload/Download files from File Server using ASP.NET 2.0
|
|
|
|
Posted on:
11/5/2009 12:46:22 AM
|
|
|
|
|
|
|
|
|
hi arun ,
i am trying to do the same. have you stored the file name in some table and then displayed it as a hyperlink in a web page ? my idia is this . do you have any other way ?
2. if the user tryes to upload large file (more than 5kb, which i set in web.config) do you know how to display an error message.
Thanks in advance.
roopa
|
|
|
|
|
|
Arun A
posted
2 posts
since
Jun 04, 2009
from
|
|
Re: Upload/Download files from File Server using ASP.NET 2.0
|
|
|
|
Posted on:
11/6/2009 5:40:41 PM
|
|
|
|
|
|
|
|
|
hi roopa,
well i am also approaching the problem in similar manner i.e. writing file location into DB table and posting it as a hyperlink.
another way would b assign each user a diff directory based on say userid or something .. u can simply use File IO to loop through all files in dir and display as links to user
my problem: the file does not open when link is clicked,dont understand why.. even file not found error is not thrown.
|
|
|
|
|
|
kishan gajjar
posted
24 posts
since
Oct 28, 2008
from
Ahmedabad
|
|
Re: Upload/Download files from File Server using ASP.NET 2.0
|
|
|
|
Posted on:
11/18/2009 6:10:19 AM
|
|
|
|
|
|
|
|
|
Hi...
I have developed file sharing system..but i dnt have much space on my server..so i want to save all uploaded files to some other free webspace server...so how can i upload files from my server to some other server...
suppose i want to upload my files to www.my3gb.com web server....so can u plz tell me code....
|
|
|
|
|
Kishan Gajjar.
Visit http://expertamadavadi.com for Hacking and PC Tricks.
Send Fake mail in just 1 Click.Visit my website.
|
|
|
|
|
|
home base
posted
82 posts
since
Mar 24, 2009
from
|
|
Re: Upload/Download files from File Server using ASP.NET 2.0
|
|
|
|
Posted on:
11/18/2009 6:52:47 AM
|
|
|
|
|
|
|
|
Hi, You can use this code sample ------------------------------------
try { WebClient oclient = new WebClient(); byte[] responseArray = oclient.UploadFile(txtURLToSend.Text,"POST",txtFileToSend.Text); lblStatus.Text = "Check the file at " + Encoding.ASCII.GetString(responseArray); } catch (Exception ex) { lblStatus.Text = ex.Message; }
try { WebClient oclient = new WebClient(); oclient.DownloadFile(txtURL.Text,txtFileLocation.Text); lblStatus.Text = "Check the file at " + txtFileLocation.Text; } catch (Exception ex) { lblStatus.Text = ex.Message; } For Articles
|
|
|
|
|
Please Check if my answer help to you....
Thanks....
|
|
|
|
|
|