Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > UpdatePanel Postback - How to make it work ?

Reply
Thread Tools

UpdatePanel Postback - How to make it work ?

 
 
Jl_G_0
Guest
Posts: n/a
 
      03-29-2007
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.

 
Reply With Quote
 
 
 
 
bruce barker
Guest
Posts: n/a
 
      03-29-2007
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)




Jl_G_0 wrote:
> 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.
>

 
Reply With Quote
 
 
 
 
Jl_G_0
Guest
Posts: n/a
 
      03-30-2007
thanks for answering me.

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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Triggering an UpdatePanel with a trigger located outside of the UpdatePanel Nathan Sokalski ASP .Net 1 06-15-2009 06:23 PM
refresh an updatePanel in an other updatePanel fran_j_diaz@yahoo.fr ASP .Net 3 08-08-2007 06:30 AM
UpdatePanel, Postback marss ASP .Net 2 01-25-2007 12:41 PM



Advertisments