UploadAttachments cleaning.

Last post 07-06-2009, 9:51 AM by cutechat. 3 replies.
Sort Posts: Previous Next
  •  07-06-2009, 8:02 AM 53752

    UploadAttachments cleaning.

    I have an UploadAttachments control in a form with other several controls (TextBox, RadioButtons, etc) intended to gather information  from the user, which is the preferred way to clean the item collection of the UploadAttachments after the page has been post back , the information and the attchs saved to the data base and the form is presented to the user empty and ready to received more information.

    Is there a UploaderControl.Items.Clear or UploaderControl.Items.Reset

    The delete seems to cause problems since it tries to delete the files in the temp directory while the files still in use by other process (.NET engine I guess)

    Thanks for any help. Regards Anddy

  •  07-06-2009, 8:48 AM 53754 in reply to 53752

    Re: UploadAttachments cleaning.

    Hi,
     
    Please try control.DeleteAllAttachments()
     
    Regards,
    Terry
  •  07-06-2009, 9:26 AM 53760 in reply to 53754

    Re: UploadAttachments cleaning.

     

    Thanks for your response, As I said in my previous post

     

    DeleteAllAttachments, causes this error to be fire, the file is still being handle by the .net engine while is been tried to be deleted.

     

    Error Message: The process cannot access the file ….\Data\Temp\persisted.671ddb4d-cfde-4c9c-be46-e1f52e85bdf5.516lOL-e1KL._SS500_.jpg.resx' because it is being used by another process.

     

    I need just a way to clean the item collection to be able to present the user with a form ready to accept new information.

  •  07-06-2009, 9:51 AM 53761 in reply to 53760

    Re: UploadAttachments cleaning.

    Hi,
     
    So please try the control.Items[i].Remove();
     
    Regards,
    Terry
     
View as RSS news feed in XML