This is a migrated thread and some comments may be shown as answers.

Rad Upload Problem Getname

2 Answers 56 Views
Upload (Obsolete)
This is a migrated thread and some comments may be shown as answers.
mohamed
Top achievements
Rank 1
mohamed asked on 12 Jul 2012, 06:57 AM


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 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 13 Jul 2012, 05:27 AM
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.
0
mohamed
Top achievements
Rank 1
answered on 13 Jul 2012, 06:09 AM
Thanks for reply princy,

Problem resolved.

Thanks Advance,
Mohamed.
Tags
Upload (Obsolete)
Asked by
mohamed
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
mohamed
Top achievements
Rank 1
Share this question
or