I have the following piece of code:
AddHandler sharepoint.UploadCompleted, AddressOf UploadEmailCompleted
I require it to work like so:
AddHandler sharepoint.UploadCompleted, AddressOf UploadEmailCompleted(message)
I fully appreciate this isn’t possible, and after a little research, I think using a delegate may be the way forward. However I’m struggling to implement a solution that works.
Am I on the right track, or is what I’m attempting not possible?
What is
messageintended to be? Is it the message that was sent, or an error message? If sharepoint.UploadedCompleted returns EventArgs, you can access these within your callback function. For example I have the following code for loading an email template within a service:Then within my client app, I just do:
I can then access the return value via the
LoadEmailTemplateCompletedEventArgs. Can you do something similar with sharepoint.uploadcompleted? i.e configure it to return a value, then access it via EventArgs?Oh, for reference, the event handler is just: