TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Sandeep kumar
NA
58
4.5k
ajaxToolkit:AsyncFileUpload
Feb 14 2021 8:58 AM
How can i do multiple file upload through ajaxToolkit:AsyncFileUpload.
please help me and provide code. as soon as possible.
Actually i am stuck in this situation.
<script>
function
UploadStarted(sender, args) {
//Check the filename
var
filename = args.get_fileName();
var
filext = filename.substring(filename.lastIndexOf(
"."
) + 1);
if
(filext ==
"exe"
|| filext ==
"sql"
|| filext ==
"bak"
|| filext ==
"bat"
) {
var
err =
new
Error();
err.name =
'My API Input Error'
;
err.message =
'Cannot Upload .exe, .sql, .bak, .bat files'
;
throw
(err);
return
false
;
}
else
{
return
true
;
}
}
</script>
<div>
<div>
<ajaxToolkit:AsyncFileUpload
OnClientUploadError=
"uploadError"
OnClientUploadComplete=
"UploadComplete"
ID=
"dmsFile"
UploadingBackColor=
"HotPink"
CompleteBackColor=
"#FFFFCC"
OnUploadedComplete=
"dmsFile_UploadedComplete"
runat=
"server"
BorderWidth=
"0"
MaximumNumberOfFiles=
"3"
OnClientUploadStarted=
"UploadStarted"
/>
<%-- <asp:FileUpload ID=
"dmsFile"
runat=
"server"
multiple=
"multiple"
/>--%>
<asp:ImageButton ID=
"btnCreateNew"
Visible=
"true"
SkinID=
"imageButtonCreate"
runat=
"server"
OnClick=
"btnCreateNew_Click"
/>
<div id=
"upLoadMessage"
></div>
</div>
Attachment:
SourceCode.zip
Reply
Answers (
3
)
Passing a parameter to a Div element
DropDownListFor in MVC