Posts

Showing posts with the label AsyncFileUpload

AsyncFileUpload AJAX Control

//.aspx Code: <head runat=”server”> <title>::AsyncFileUpload::</title> <script type=”text/javascript” language=”javascript”> function uploadError(sender, args) { document.getElementById(‘lblStatus’).innerText = args.get_fileName(), “<span style=’color:red;’>” + args.get_errorMessage() + “</span>”; } function StartUpload(sender, args) { document.getElementById(‘lblStatus’).innerText = ‘Uploading Started.’; } function UploadComplete(sender, args) { var filename = args.get_fileName(); var contentType = args.get_contentType(); var text = “Size of ” + filename + ” is ” + args.get_length() + ” bytes”; if (contentType.length > 0) { text += ” and content type is ‘” + contentType + “‘.”; } document.getElementById(‘lblStatus’).innerText = text; } </script> </head> <body> <form id=”form1″ runat=”server”> <asp:ScriptManager ID=”ScriptManager1″ runat=”server”></asp:ScriptManager> <div> <asp:AsyncFileUpload ID=”A