Problem with asyncupload upload file

2 posts, 0 answers
  1. Fabio Cirillo
    Fabio Cirillo avatar
    181 posts
    Member since:
    Jan 2010

    Posted 20 Feb 2013 Link to this post

    i want to uplaod file with radasyncupload....and i want get name file uploaded too. Then my code is:
    <telerik:RadAsyncUpload ID="RadAsyncUpload1" runat="server"
    AllowedFileExtensions="jpg,jpeg,png,gif" Font-Names="Verdana"
    ManualUpload="True" MaxFileInputsCount="1" MaxFileSize="3000000" Skin="Sunset"
    <Localization Select="Cerca" />
    function startManualUpload() {
    var upload = $find('<%=RadAsyncUpload1.ClientID%>');

    and start upload with code behind:

       Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
           If Not IsPostBack Then
               RadAsyncUpload1.TargetFolder = "~/Image/image_utenti/" & Session.Item("idutente")
           End If
       End Sub  
    Protected Sub Imgbtncarica_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs) Handles Imgbtncarica.Click
           ScriptManager.RegisterStartupScript(Page, Me.GetType, "Upload", "startManualUpload();", True)
           ViewState("DirImage") = ViewState("RemoteFolder") & RadAsyncUpload1.UploadedFiles.Item(0).FileName
           update_image(Session.Item("idutente"), ViewState("DirImage"))
       End Sub

    If i click on button "Imgbtncarica" the file in not uploaded, because i go to see into folder and there's not the file....Why?

    Please help me, thank you

  2. Suthish
    Suthish avatar
    7 posts
    Member since:
    Feb 2013

    Posted 21 Feb 2013 Link to this post


    For Each file As UploadedFile In AsyncUpload1.UploadedFiles
       //here file.FileName
Back to Top