Tag Archives: UploadedComplete

Upload File With Asp .Net AsyncFileUpload Ajax Control Inside ModalPopupExtender

Asp .Net makes upload file process is easy task. As long as the server upload directory has sufficient permission, we can save file to that directory. Beside that we can specify what kind of file we want to save.

AsyncFileUpload is an Ajax Control to upload file asynchronously. Click on browse/select file button and choose file location then the control will automatically upload the file to server. The file uploading results can be checked both in the server and client sides.

Its basic tag example is <ajaxToolkit:AsyncFileUpload ID=”asyncfileupload1″ runat=”server” OnClientUploadComplete=”uploadcomplete” OnClientUploadError=”uploaderror” />. It have client event OnClientUploadComplete contains client script function that execute when upload file is success and OnClientUploadError is same but execute when upload file is error.
Other client event is OnClientUploadStarted executes when upload process started.
Also it have server event UploadedComplete and UploadedFileError that execute on server when upload file is success and error respectively.
For complete description explanation about AsyncFileUpload please refer to link http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/AsyncFileUpload/AsyncFileUpload.aspx

In this post, I will write example of AsyncFileUpload Ajax Control along with ModalPopup Extender as container. I already have example of using ModalPopupExtender Ajax Control at this link Create a PopUp Dialog with ModalPopupExtender AjaxControlToolkit
This example will only allow image (jpg, gif, png) file to be uploaded.

Continue reading