Click here to Skip to main content
15,306,142 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
how to upload a document and download a document in
i need to know the coding in c#......
Thank you......

1 solution


Without programming, if you have an anchor in HTML code with href pointing to document's URI, you can simply use content menu item "Save As":
<a href="myDocument.pdf">Download document</a>

If the use clicks the link, it might be just loaded as a page, depending of file type.
This is how you can enforce downloading with "Save As" dialog using Content-disposition:[^].


To upload a file, you just need a Web form with method "POST", but to process the upload you need some server-side coding.
This is the detailed ASP.NET tutorial:[^].
This CodeProject article provides very clear and simple explanation: File Upload with ASP.NET[^].


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