Nitin Bhardwaj

Nitin Bhardwaj

  • 0
  • 15.6k
  • 6.2m

File upload control not working with update panel

May 15 2014 5:27 AM

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:UpdatePanel ID="UpdatePanel1" runat="server">
<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>
<asp:PostBackTrigger ControlID="Button1" />

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

Answers (1)