Description:-
In this Example we will Create Auto Upload file using JQuery in Dot net. Browse file and Upload Directly with Specify Folder. Here we will Create Script for Browse File and Upload Directly. Using Uplodify JQuery we can achieve this functionality.
Drag and Drop
FileUpload Control in your Webpage.
<div style="padding: 40px">
<asp:FileUpload ID="FileUpload1" runat="server" />
</div>
We will User
JQuery in this Webpage is given below.
<script type="text/javascript" src="jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="jquery.uploadify.js"></script>
Now Create
Script for Auto Upload after Selecting File with Some Property like Auto
Upload, Multi Select File, and Folder for Save Image, Image Extension for
Validation, Files Description, and Button Text for Browse files etc...
<script type="text/javascript">
$(window).load(
function ()
{
$("#<%=FileUpload1.ClientID
%>").fileUpload({
'uploader':
'scripts/uploader.swf',
'cancelImg':
'images/cancel.png',
'buttonText':
'Browse Files',
'script':
'Upload.ashx',
'folder':
'Files',
'fileDesc':
'Image Files',
'fileExt':
'*.jpg;*.jpeg;*.gif;*.png',
'multi':
true,
'auto':
true
});
}
);
</script>
Now run your
Application and Browser File it will Auto Upload your Selected File in your
Selected Folder.
Thanks for comments.....