It's hard to say what exactly happened, because you still don't show all relevant parts of the code. Importantly, your code sample tells nothing about the button which is supposedly named
btnSave
and nothing indicates that an event handler
btnSave_Click
is added to an invocation list of the event instance
Click
of this button. Is is not shown in this button related to the post of the file or not. Importantly, you don't show the form and its controls.
So, I only can
suspect that the problem is related to this button and the event handler: what happens in this event handler happens
before posting of the file, or file is
not posted at all.
If you look at the Microsoft code sample, everything is clear: forms is shown, one can see what triggers the post. You should also do it in a similar way, please see:
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.fileupload.hasfile.aspx[
^].
—SA