This is code snippet is from blueimp File Upload. The <form action="FileTransferHandler.ashx" method="post" enctype="multipart/form-data"> does not seem o work for me.
I am using a master page. When i remove the <form action="FileTransferHandler.ashx" method="post" enctype="multipart/form-data"> from the page and add action="FileTransferHandler.ashx" method="post" enctype="multipart/form-data" to the form tag of the master page. It starts working. Why??
<div id="fileupload">
<form action="FileTransferHandler.ashx" method="post" enctype="multipart/form-data">
<div class="fileupload-buttonbar">
<label class="fileinput-button">
<span>Add files...</span>
<input type="file" name="files[]" multiple="multiple" />
</label>
<button type="button" class="delete button">Delete all files</button>
<div class="fileupload-progressbar"></div>
</div>
</form>
<div class="fileupload-content">
<table class="files"></table>
</div>
</div>
As you noticed, the
Master Pagehas a (server side)form. You cannot nest forms – which is what you are doing when you add (an additional)<form/>tag in the (content) page.You can either –
set a button’s
PostBackUrlproperty toPostto some other target.use a different
Master Page(or not use one at all) for the page