I've seen nothing but real janky solutions to the problem at hand. That problem being that fileupload doesnt appear to be working on an update panel.
I've done a signifigant ammount of research and understand WHY it occurs, but not if theres any real way to circumvent the problem. I was wondering if anyone has been able to make a signifigant difference where fileupload could occur and not initiate a full postback.
I am using july ctp.
Anything that can be done?
I ran into exact problem. Only solution, by my opinion is to use client button control, and manage fileupload with javascript. Unfortunatelly I don't know javascript nor I have time to learn it :(What is the problem putting a (invisible) button outside the update- panel and the upload- button inside the panel. Then you add a new eventhandler to the outside- button and process the things you want to there (save the file, show the file, redirect, ...).
The last thing you have to do is to trigger the outside- button event if the inner button is clicked. you just have to add a onclick- attribute: InnerButton.Attributes.Add("onclick", Page.ClientScript.GetPostbackEventReference(OutsideButton, ""))
ollifant
Nice, but there are still few problems:
- fileUpload control has its property "hasFile" set to'true' only if second time fire button click event (first time nothing happened)
- page still refreshs whole content even if i add button to trigger collection of update panel
forgive me my poor english
FileUpload controls when they are used to upload files as part of an asynchronous postback.
See for more details..
http://ajax.asp.net/docs/overview/UpdatePanelOverview.aspx
No comments:
Post a Comment