varunmaggo's say

Getting better never stops!

async upload control in update panel (asp.net web forms)

leave a comment »

There is an issue with upload controls when used with update panels. Moreover they are not just supported.

The quick fix is:

Put this in your page load  Page.Form.Attributes.Add(“enctype”, “multipart/form-data”);

Put a trigger to your update panel : <Triggers>
                <asp:PostBackTrigger ControlID=”btnSubmit” />
            </Triggers>

Put your upload control : <asp:AsyncFileUpload ID=”fuImage” runat=”server” UploaderStyle=”Modern” Style=”margin-left: 100px;”
                                                onchange=”return ImageValidate()” />

 

Thanks

Advertisement

Written by Varun Maggo

January 31, 2012 at 9:50 am

Posted in Uncategorized

Tagged with , ,

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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

Follow

Get every new post delivered to your Inbox.