Hi
I have a big and slow code for event FileUploaded.
During execution of this code, i've got an exception message:
Sys.WebForms.PageRequestManagerServerErrorException: Object reference not set to an instance of an object.
In js code function
function Sys$WebForms$PageRequestManager$_endPostBack
Also, if i try debug the event FileUploaded very slowly, i've got this message too.
- protected void fileinput_FileUploaded(object sender, UploaderEventArgs args)
- {
- Uploader uploader = (Uploader)sender;
- Uploader uploaderControl = null;
-
-
- foreach (Control c in this.UpdatePanel1.ContentTemplateContainer.Controls)
- {
- if (c is Uploader)
- {
- if (c.Visible)
- {
- uploaderControl = (Uploader)c;
-
-
- if (uploaderControl.ID == uploader.ID)
- {
- string path = "C:\\UploaderTempNew\\";
- args.MoveTo(path + args.FileName);
- }
- }
- }
- }
- }
After i've got an exception, the uploader stops working and page not refreshed.
As result - the .resx files not deleted after uploading.
How i can execute big and slowly code without this exception?