Click here to Skip to main content
15,920,217 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
How to upload a file and how to download from folder?
Posted

Have a look at these Google[^] results.
 
Share this answer
 
Design page
VB
<asp:FileUpload ID="flUpload" runat="server" />


Code behind
C#
protected void submit_Click(object sender, ImageClickEventArgs e)
    {
        string ID=textbox1.text;
        flUpload.SaveAs(Server.MapPath("user_doc/" + ID + ".doc"));
    }
 
Share this answer
 
v2
Assuming this is ASP, then place a FileUpload control on your page, and handle the OnClick event:
C#
string filename = Path.GetFileName(MyFileUpload.FileName);
MyFileUpload.SaveAs(Mypath + filename);


To download it, just add a link to the file top your web page - the client browser will do the rest.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900