devxlogo

Uploading a file on the server

Uploading a file on the server

Uploading a file from the client to the server is very straightforward with ASP.NET. Just use the tag and its wrapper class HtmlInputFile. Here’s how you define the control on the page:

Select a file to upload:

And here’s the code you write in the code-behind file (or in the page’s