UpdatePanel Postback - How to make it work ?

  • Thread starter Thread starter Jl_G_0
  • Start date Start date
J

Jl_G_0

I have a form with ALL my controls on an updatepanel, but theres one
giving me a hard time, its an asp:FileUpload control.
All I want to do is:
- Click on a LinkButton <- WORKS
- Open a ModalPopUpExtender with the FileUpload <- WORKS
- Select the file and click on another LinkButton to close the
ModalPopUp <- WORKS
- Click on SEND and send the file. <- ERROR HERE

I can make it work perfectly without the UpdatePanel, or if I set the
UpdatePanel to PostBack when I Click on SEND.
However I want it to work with no postbacks, but seems like its not
possible.
I guess the problem is when the UpdatePanel does its AsyncPostBack,
it sets the FileUpload.PostedFile.Filename to NULL, and causes an
error (object reference...).

Any ideas ?

Thx.
 
the update panel does not support fileupload.

the update panel uses ajax to send the value of controls to the server,
the server then produces the html and sends it back. the update panel
then display the html.

the fileupload uses the browser to do a mutipart mime type to send the
filedata. browser security prevents javascript setting the name.

you could host an iframe with a fileupload that posted back.

-- bruce (sqlwork.com)
 
thanks for answering me.

well, I guess I can try the Iframe then... everything to avoid the
postback...
 
Back
Top