Rad Upload Problem Getname

Thread is closed for posting
3 posts, 0 answers
  1. mohamed
    mohamed avatar
    311 posts
    Member since:
    Mar 2011

    Posted 12 Jul 2012 Link to this post



    See the Attachment ,

    string RMS = FileUpL.UploadedFiles[0].GetName();      this's the way i'm getting the file name in server side ,
    Index was out of range. Must be non-negative and less than the size of the collection.
    Parameter name: index

    Error Come Like That

    Thanks Advance,
    Mohamed.
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 13 Jul 2012 Link to this post

    Hi Mohamed,

    I was not able to replicate your problem. Here is the sample code that I tried and worked as expected at my end.

    ASPX:
    <telerik:RadUpload ID="RadUpload1" runat="server"></telerik:RadUpload>
    <asp:Button ID="Button1" runat="server" onclick="Button1_Click" />

    C#:
    protected void Button1_Click(object sender, EventArgs e)
      {
         string name = RadUpload1.UploadedFiles[0].GetName();
      }

    Please provide your code where I can replicate your problem locally.

    Regards,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. mohamed
    mohamed avatar
    311 posts
    Member since:
    Mar 2011

    Posted 13 Jul 2012 Link to this post

    Thanks for reply princy,

    Problem resolved.

    Thanks Advance,
    Mohamed.
Back to Top