Reputation: 18117
I am using html form below and on my local computer trying to upload file to ASP.NET HTTPModule and read files using HttpContext.HttpRequest.files
Unfortunately HttpContext.HttpRequest.files
do not contain any files. Where is the problem?
<html>
<body>
<form action="http://localhost:2006/MyASPNETModule" method="post" enctype="multipart/form-data" >
Please choose file from your computer <br />
<input type="file">
<button id="btnConvert" type="submit">
Convert</button>
</form>
</body>
</html>
Upvotes: 1
Views: 1290
Reputation: 1039130
Give your file input a name:
<input type="file" name="file" />
Upvotes: 1