Your code is correct only. As I guessed, you have taken your file upload control inside the update panel(You can see the same situation here
]). Remove the update panel and check it again.
Add a trigger for
<asp:postbacktrigger controlid="btnCertificateUpload" />
This will force a postback when the upload button is clicked.
After that add the below line to the
Hope it helps.!