Thanks ...
It works for me finally when i put everything in UserProfileModule.ascx. Many thanks for it and it works because you helped me.
I can i can upload as many as user want with this module. But want is to upload only one file and if user upload any other, it should replace the existing one. Is it possible?
With the built-in functionality, no ... you will have to add a few lines of code to accomplish this.
- you will have to attache a method to an
FileUploaded event in order to delete any existing files with that relation
uploadModule.FileUploaded +=
new
EventHandler<FileUploadEventArgs>(uploadModule_FileUploaded);
in the
uploadModule_FileUploaded you will have to:
- Delete file from File Provider you are using - e,g,
MonoXFileSystemProvider
- Delete the file item entry in the
SnFiles table
- Remove/Delete the relation from
SnRelationship table
Regards