FileUpload in UpdatePanel

Want to include a FileUpload in UploadPanel using Ajax-enabled ASP .NET WebForms?

You need to do two things:

  • Set encoding type to the form element to multi-part: <form … enctype=”multipart/form-data”>
  • Add a non-async postback trigger on the UpdatePanel for the button that you want to read the uploaded file stream on: <asp:UpdatePanel …>…<Triggers>…<asp:PostBackTrigger ControlId=”Button”/></Triggers></asp:UpdatePanel>

About Sorin Dolha

My passion is software development, but I also like physics.
This entry was posted in ASP .NET and tagged , , , , . Bookmark the permalink.

Add a reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s