Author: danielz000 | Posted on: 10/15/2008 5:39:48 AM | Views : 278

Hi All,

I don't think the code I have written functions correctly... I am trying to lock code in part of an ASPX page. I think I have locked the code for each instance of the page running, when really i want to lock the code for all of the instances of the page that are running on the server.

The reason for this is that after uploading a file from a web form I am having to save it on my server before attaching it to an email (the reason for this is that I need to use system.web.mail which unlike system.net.mail will now allow me to use an input stream for the file attachment). I am worried that two people upload a file with the same name, and one file overwrites the other, so, i would like the code that saves the file, attaches it to the email, sends the email and deletes the file, to be synchronised.

Can anyone tell me if the code I have written does this, and if not, how I could achieve this?

Thanks,

 Daniel

& ...

Go to the complete details ...