One of the variables created by DFP is the file extesnion.
For the file name, click the lightning bolt and expand the WA upload Files (File Field name) Group and select the File Extesnion binding.
Then paste:
<%= String(Session("Properties_MainPropertiesID")) %>. before the code that is added.