I have the following form
<form id="upload" method="post" EncType="Multipart/Form-Data" action="reciver.aspx">
<input type="file" id="upload" name="upload" /><br/>
<input type="submit" id="save" class="button" value="Save" />
</form>
When I look at the file collection it is empty.
HttpFileCollection Files = HttpContext.Current.Request.Files;
How do I read the uploaded file content without using ASP.NET server side control?
Why do you need to get the currect httpcontext, just use the page’s one, look at this example:
The example code is from Uploading Files in ASP.net without using the FileUpload server control
Btw, you don’t need to use a server side button control. You can add the above code to the page load where you check if the current state is a postback.
Good luck!