ASP.NET Fileupload and AJAX

ajaxasp.netfile upload

I have a little problem with the FileUpload and uploadpanels.

As most of you probably knows you cannot use the asp:FileUpload control without forcing a postback. At least not what I know of, let me know if I am wrong.

Now my problem is:
I have a usercontrol with a FileUpload and a button that says "Upload". This UserControl is loaded into a UpdatePanel.
Now I want to register to the upload button inside the usercontrol as a postback trigger.
Is there any way to do this?

Does anyone know of a way to make fileuploads without postbacks?

Best Regards
The real napster

Best Answer

Solved this issue

If anyone meets this challenge it can be solved by doing this in your UserControl

ScriptManager sman = ScriptManager.GetCurrent(Page);
sman.RegisterPostBackControl(btn_addDocument);