Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

Problem in AsyncFileUpload

$
0
0

Hi guys.. nothing trigger after i select a photo.. pls advice me. TQ

<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="Upload.aspx.vb" Inherits="testing.com.Upload" %><asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server"><div><cc1:AsyncFileUpload ID="AsyncFileUpload1" Width="400px" runat="server"
        CompleteBackColor="Lime" UploaderStyle="Modern"
        ErrorBackColor="Red"
        ThrobberID="Throbber"
        OnClientUploadComplete="AsyncFileUpload1_UploadedComplete"
        OnClientUploadError="AsyncFileUpload1_UploadedFileError"
        UploadingBackColor="#66CCFF" /><asp:Label ID="Throbber" runat="server" Style="display: none"><img src="Images/indicator.gif" alt="loading" /></asp:Label><br /><br /><asp:Label ID="lblStatus" runat="server"></asp:Label></div></asp:Content>

My codebehind...

Protected Sub AsyncFileUpload1_UploadedComplete(ByVal sender As Object, ByVal e As AjaxControlToolkit.AsyncFileUploadEventArgs)

        System.Threading.Thread.Sleep(5000)
        If AsyncFileUpload1.HasFile Then
            Dim strPath As String = MapPath("~/Uploads/") + Path.GetFileName(e.FileName)
            AsyncFileUpload1.SaveAs(strPath)
        End If

End Sub

Private Sub AsyncFileUpload1_UploadedFileError(ByVal sender As Object, ByVal e As AjaxControlToolkit.AsyncFileUploadEventArgs) Handles AsyncFileUpload1.UploadedFileError
        Me.lblStatus.Text = e.StatusMessage
End Sub





Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>