File upload control question

I have just discovered that the file upload control works only if it is enclosed in tags generated directly by Domino. If I close Domino and create a new one then the attachment is not saved in the document at all.Is there any way how to overcome this behaviour?