I have next form and some ashx
<form action="FileUpload.ashx" method="POST" enctype="multipart/form-data" id="frmUpload">
<input id="fileupload" type="file" name="files[]" />
<input id="viewId" type="hidden" />
<input id="moduleId" type="hidden" />
<button id="btnUpload" type="submit">Upload</button>
</form>
I can get file inside of ProcessRequest(HttpContext context)
context.Request.Files – file containe file information, but context.Request.Form[“viewId”] is empty.
That should I do to get hidden fields values ?
Thanks.
You need to add the
name="viewid"also. Thenameattribute is used when you make post, not theidread also: HTML input – name vs. id in the line “Used on form elements to submit information”