I am creating an ASP.NET website and I'm using the AJAX Control Toolkit "AsyncFileUpload" control, I just want to pass a value to the onclientuploadcomplete
client event, and I want to do that after saving the file from the UploadedComplete
server event.
Here's my current AsyncFileUpload
:
<asp:AsyncFileUpload ID="AsyncFileUpload2" runat="server" CssClass="fileupload" onclientuploadstarted="uploadStarted"
UploadingBackColor="#CCFFFF" Width="221px"
onclientuploaderror="upload_error" ClientIDMode="AutoID"
onclientuploadcomplete="done_uploading" />
And her's my current Javascript code:
</script>
<script language="javascript" type="text/javascript">
var baseUrl = "<%= ResolveUrl("~/") %>";
function done_uploading(THE_VALUE) {
//TODO: ALERT THE_VALUE
}
function uploadStarted(sender, args) {
var file = args.get_fileName();
var extensions = "7z";
if (!new RegExp("(" + extensions + ")$").test(file)) {
throw (new Error());
} else {
// show_loading();
}
}
function upload_error() {
}
</script>