radupload files count equal 0

Thread is closed for posting
3 posts, 0 answers
  1. Mona
    Mona  avatar
    11 posts
    Member since:
    May 2008

    Posted 19 Oct 2008 Link to this post

    Hi folks ;
    Iam facing a problem in saving files used to uplaod by RadUpload
    everytime while saving alwayes get 0 files count although I attached files to it
    can you help me discover where is the problem ...?

    attached radUploader tags

    <
    telerik:RadUpload ID="RUAttach" runat="server" Skin="Web20" TargetFolder="Attachment"

     

     

    Width="100%" />

     

     

     

    &nbsp;<telerik:RadProgressManager ID="RadProgressManager1" runat="server" />

     

     

    <telerik:RadProgressArea ID="RadProgressArea1" runat="server" DisplayCancelButton="True"

     

     

    ProgressIndicators="TotalProgressBar, TotalProgress, RequestSize, FilesCountBar, FilesCount, SelectedFilesCount, CurrentFileName, TimeElapsed, TimeEstimated, TransferSpeed"

     

     

    Skin="Web20">

     

     

    </telerik:RadProgressArea>

    and this is the method used to save attachments :

     

     

    RadUploadContext uploadContext = RadUploadContext.Current;

     

     

    foreach (UploadedFile file in RUAttach.UploadedFiles)

     

    {

     

    if (file != null)

     

    {

    file.SaveAs(Server.MapPath(

    "~/MyFiles/" + file.GetName()));

     

    }

    }


    the count files =0 in ( RUAttach.UploadedFiles)

    thanks in advance
    Mona

  2. Mona
    Mona  avatar
    11 posts
    Member since:
    May 2008

    Posted 30 Oct 2008 Link to this post

    Dear Telerik Team ;
    didn't hear from you . is my problem wierd enough that makes no one answer !
  3. Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 30 Oct 2008 Link to this post

    Hi Mona ,

    Actually, when you set the TargetFolder, you do not need to save the files manually using the SaveAs method. The files will be uploaded to the target folder on the first postback automatically.
     

    Best wishes,
    Veselin Vasilev
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top