Main Topics
Browse All TopicsI use UpdatePanel and FileUpload but when i get fileUpload.PostedFile alway be null
and when i try add Triggers the page refresh
i don't want it refresh
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Anyway: your only solution is to use an iframe. You can have it in a complicated way (so that you do not understand that an iframe is being used), or you can do it straightforward.
The reason for this is browser-security.
Updatepanels and other AJAX-like methods send information to the server using javascript, and get information back. Based on the returned information, changes to the DOM in the browser are made.
With fileupload, there is a security issue. For any javascript to upload a file, it would need to have access to the filesystem of the client. For obvious reasons, javascript from the browser is NOT allowed to read files from the filesystem (and upload them). Javascript doing a fileupload behind the scenes is not going to work.
An iframe holds a separate HTML-file, and therefor can be used for fileupload.
The markup in your code isn't ugly, the ACT is easy to deal with (though the rendered markup is still a little ugly). And their software is tested by many, so security is less of a concern (checking by the masses, may not be correct, but it works for me).
The point is that writing your own is probably not the best approach, as an upload tool does not allow javascript activation due to security issues.
@sybe - no need to add juvinile comments that add nothing to the discussion, we are trying to help answer questions here aren't we?
> we are trying to help answer questions here aren't we?
Yes. And the answer is to use an iframe.
It can be done in a complicated way, by writing a javascript that quickly replaces an input box with an iframe when it is focussed (and changes it back on blur), or it can be done with a static iframe. There is really no difference, except that the javascript solution is needlessly complicated.
I find it remarkable that on one hand you reject an iframe solution, and on the other hand recommend a solution that uses an iframe, but does that in such a complicated way that you do not understand how it works.
I got this Error when i try to use AsyncFileUpload
Server Error in '/' Application.
--------------------------
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Unknown server tag 'cc1:AsyncFileUpload'.
Source Error:
Line 24: <ContentTemplate>
Line 25:
Line 26: <cc1:AsyncFileUpload ID="AsyncFileUpload1" runat="server" />
Line 27:
Line 28: </ContentTemplate>
Source File: /WebForm6.aspx Line: 26
--------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3082
Business Accounts
Answer for Membership
by: naspinskiPosted on 2009-10-19 at 23:57:08ID: 25611563
A FileUpload control will not work without a postback, period, that is how it is designed. There are ways to hide it using iframs and such, but they are ugly and I am not sure how secure they are.
axControlT oolkit/Sam ples/ Async FileUpload /AsyncFile Upload.asp x
Your main option is to look for antoher upload tool. I know Telerik has some and the Ajax Control Toolkit (free) just came out with an Async upload tool - http://www.asp.net/AJAX/Aj