Free Jobs

Dot Net Forums: ASPNET (77) C#.NET (39) VB.NET (8) AJAX (21) Silver Light (1) WCF (10) WPF (1) WWF (1) .NET 3.5 (3) SQL SERVER (38) Other (3)

Topic: How to use file upload control inside update panel in C# ASP NET

To get the Posted Questions details daily in your mail Click Here

Share this Post on Facebook/Twitter/Orkut Bookmark and Share

User: rajiv100 Post Date: 13 Apr 2011 03:04

Introduction: asp:FileUpload control will not work inside Update panel
For that you need to use PostBackTrigger

Main Content:

use it as below.

<ajax:UpdatePanel ID="UpdatePanel1" runat="server">


  <ajax:PostBackTrigger ControlID="ButtonUpload" />



<asp:FileUpload ID="FileUpload1" runat="server" Width="300px" />


<asp:Button ID="ButtonUpload" runat="server" Text="Upload" OnClick="ButtonUpload_Click" />



Beacuse of Update Panel Partial update feature and event sequence
ButtonUpload_Click event will not be able to get the selected file
if ajax:PostBackTrigger is not used.

About Writer:
Hi,I am .NET Developer From Bangaloret

Writer's Link:

Writer's Email:

Post Comment

Similar Articles Top ArticlesLatest Articles Other Articles by this Author Copyright © 2009-2011 | All Rights Reserved
All content of this website is protected by copyright laws and should not be reproduced in any form or by any means without written permission
(Best viewed in IE 8.0+ or Firefox 3.0+ at resolution of 1024 * 768 or higher)