Double postback

May 22, 2009 at 8:24 AM

I am sitting with a problem where I get a double postback when I have the FileUpload control on my page? The control is placed within a update panel.

Any ideas or help would really do!



Aug 4, 2009 at 3:48 AM
I have the same problem, and modify all properties of control and still not working. I think the control has this defect. I need help.
Aug 26, 2009 at 3:18 PM

Yes, I agree. I think the file uploader control uses iframe, which causes a postback everytime your page takes some action.  So, first your web form posts back, then this iframe of the ajax file uploader posts back.

Double postback itself isn't a big deal, the big problem is that after the iframe posts back, all your paramters are lost, therefore you will have a huge problem passing variables and their values through the query string from one page to the page which uses this control.  I am working around this problem by storing the query string variables and their values in the SQL Server database per session.  But, I don't like this workaround, I would like something more straightforward.

I tried using Context to send values from one page to the page which uses this control, but it still doesn't work, because the iframe cannot get the Context info.

It's nice control only if you won't be using values from other pages.  But in real applications, we quite often do need to pass things like CustomerID, AuthorID, OrderID and so on and so forth.  The conclusion is that this control is pretty to hard to use in a real application.