Quantcast
Channel: AjaxControlToolkit Work Item Rss Feed
Viewing all articles
Browse latest Browse all 4356

Closed Issue: AsyncFileUpload don't work in repeater [27352]

$
0
0
Hi,

I detect an issue inside the AsyncFileUpload component when I use it inside a repater.

The issue is in the ReceivedFile function.
```
foreach (string uploadedFile in this.Page.Request.Files)
{
string fileToUse = uploadedFile;
if (fileToUse.EndsWith(straggler))
{
fileToUse = fileToUse.Remove(fileToUse.Length - straggler.Length);
}
if (fileToUse.Replace("$", "_").EndsWith(sendingControlID))
{
file = this.Page.Request.Files[uploadedFile];
break;
}
}
```
This part of code don't work because it don't take the id generated by the repeater

I propose this solution :
```
if (this.Page.Request.Files.AllKeys.Contains(UniqueID + straggler))
file = this.Page.Request.Files[UniqueID + straggler];
```
I had this before the foreach and it's works.

I think the foreach can be replace by this short code but I am not sure.

What do you think ?
Comments: This is a good suggestion. We will take it into account while working on the toolkit. Thank you!

Viewing all articles
Browse latest Browse all 4356

Trending Articles



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