Need help changing this php code to asp please

Hi I’m designing a flash application to upload images dynamically. I think ive got the flash side working from the tutorial I used. But it requires server side scripting which I am not that knowledgeable of. The tutorial I used used an example of Php, but I need to use asp.

The code used was

<?php

move_uploaded_file($_FILES[‘Filedata’][‘tmp_name’], “…/files/”.$_FILES[‘Filedata’][‘name’]);
chmod("…/files/".$_FILES[‘Filedata’][‘name’], 0777);

?>

Could anyone help me, or give me some pointers with the asp alternative to this code? I’d be very grateful, thanks.