I am trying to upload image file(s) for my project with bootstrap jquery using the HTML5 input type="file" tag in ASP.NET 3.5. I tried so many different methods to do it without using File Upload. However, I couldn't do it with success.
I need your help please. How can I use "input type="file" … " instead of asp:FileUpload
Thanks in advance.
.aspx design page is like this:
<div class="row">
<div class="col-xs-12 col-md-6 col-md-offset-3 col-sm-8 col-sm-offset-2">
<!-- image-preview-filename input [CUT FROM HERE]-->
<div class="input-group image-preview">
<input type="text" class="form-control image-preview-filename" disabled="disabled" />
<!-- don't give a name === doesn't send on POST/GET -->
<span class="input-group-btn">
<!-- image-preview-clear button -->
<button type="button" class="btn btn-default image-preview-clear" style="display:none;">
<span class="glyphicon glyphicon-remove"></span> Temizle
</button>
<div class="btn btn-default image-preview-input">
<span class="glyphicon glyphicon-folder-open"></span><span class="image-preview-input-title">
Choose File</span>
<input type="file" accept="image/png, image/jpeg, image/gif" name="input-file-preview" />
<!-- rename it -->
</div>
</span>
</div>
<!-- /input-group image-preview [TO HERE]-->
</div>
/div>
<div class="w3-container w3-padding">
<table width="100%">
<tr>
<td width="16%">
<td width="25%">
<asp:LinkButton ID="resimYukle" runat="server" class="w3-btn w3-theme"
onclick="resimYukle_Click">
<span aria-hidden="true" class="fa fa-pencil"></span> Save</asp:LinkButton>
<td width="59%">
</td>
</td></td></tr></table>
</div>
Screenshot is like this:
