1
Reply

File upload control not working with update panel

Nitin Bhardwaj

Nitin Bhardwaj

May 15 2014 5:27 AM
2.5k
Hi,

I am working with Asp.Net FileUpload control with ajax update panel,

if i use the AsyncPostBackTrigger,i am unable to get the filename in serverside,
but if i use PostBackTrigger its working fine with page refreshing

my Html code is:

<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:FileUpload ID="FileUpload1" runat="server" />
<asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" />
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="Button1" />
</Triggers>

I dont want to refresh page while uploading file.
 
Please tell me. 

Answers (1)