Causing Full Postbacks from Inside of UpdatePanel

Recently I had a need where I wanted to just make one control inside of my Update Panel fully post back to the server with out any asynchronous request. Well my need had to do with uploading a file which is an upload control followed by an upload button. If you have tried like me before you would realize that you cannot upload a file from inside of an Update Panel. It has to go through a regular postback to successfully upload the file to the server. If you have a similar need you can make use of triggers collection and add upload button as part of Postback trigger instead of an asynchronous postback trigger. Here is a simple markup that demonstrate the behavior.

image

No Comments