I am submitting a simple form to an asp.net page. Everything works fine except the form does not submit the file input values.
<form id="mainform" action="http://<%=Request.Url.Authority %>/ABC/Handler/Submit.aspx" method="post" enctype="multipart/form-data">
<input type='file' id='file_d6'data-mandatory='0' name='file_d6' style='visibility: hidden; position: absolute;' onchange='showPreview(this)' />
<input type='file' id='file_d7'data-mandatory='0' name='file_d7' style='visibility: hidden; position: absolute;' onchange='showPreview(this)' />
<input style='height: 100%;' type='submit' class='subCtrl' onclick='return isReadyToSubmit();' >
</form>
In the function isReadyToSubmit I check the value of all input fields in the form. It shows me values of both file input fiels, but when I submit the form it submits all fields except file input
function isReadyToSubmit()
{
$("form#mainform :input").each(function(){
alert($(this).val());
});
return true;
}
type="file"?