ASPForums.Net RSS Feedhttp://www.aspforums.net/Handlers/RSS.ashxLatest additions to the content that appears on ASPForums.Net(c) 2019 www.aspforums.com. All rights reserved.[Solved] FileUpload is empty after UpdatePanel Partial Postback in ASP.Net<p>Hi <a class="username" rel="Amol111">Amol111</a>,</p> <p>Your html is inside updatepanel so when you select dropdown then fileupload also is getting refresh because of fileupload also inside updatepanel. If you did't want to refresh fileupload when dropdown value changed so you need to put fileupload outside the uploadpanel.</p> <p>Refer below html.</p> <p><span style="text-decoration: underline;"><strong>HTML</strong></span></p> <pre class="brush: html">&lt;div class=&#34;form-horizontal&#34;&gt; &lt;asp:ToolkitScriptManager ID=&#34;ToolkitScriptManager1&#34; runat=&#34;server&#34;&gt; &lt;/asp:ToolkitScriptManager&gt; &lt;div class=&#34;form-group&#34;&gt; &lt;div class=&#34;col-md-12 col-lg-12&#34;&gt; &lt;div class=&#34;col-md-12 col-sm-12 col-xs-12&#34;&gt; &lt;div class=&#34;x_panel&#34;&gt; &lt;div class=&#34;x_content&#34;&gt; &lt;div class=&#34;form-horizontal&#34;&gt; &lt;asp:UpdatePanel ID=&#34;UpdatePanel1&#34; runat=&#34;server&#34;&gt; &lt;ContentTemplate&gt; &lt;div class=&#34;form-group&#34;&gt; &lt;asp:Label ID=&#34;lblDate&#34; runat=&#34;server&#34; Text=&#34;Date&#34; CssClass=&#34;col-md-1 col-lg-1 control-label&#34; Font-Size=&#34;small&#34; Font-Bold=&#34;true&#34;&gt;&lt;/asp:Label&gt; &lt;div class=&#34;col-lg-3 col-md-3&#34;&gt; &lt;div class=&#34;input-group&#34;&gt; &lt;span class=&#34;input-group-addon&#34;&gt;&lt;span class=&#34;fa fa-calendar&#34;&gt;&lt;/span&gt;&lt;/span&gt; &lt;asp:TextBox ID=&#34;txtRquestRaisedDate&#34; runat=&#34;server&#34; CssClass=&#34;form-control form-control-sm disabled&#34; Enabled=&#34;false&#34;&gt;&lt;/asp:TextBox&gt; &lt;asp:CalendarExtender ID=&#34;Cal_RequestDate&#34; runat=&#34;server&#34; TargetControlID=&#34;txtRquestRaisedDate&#34;&gt; &lt;/asp:CalendarExtender&gt; &lt;/div&gt; &lt;/div&gt; &lt;asp:Label ID=&#34;Label6&#34; runat=&#34;server&#34; Text=&#34;Department&#34; CssClass=&#34; col-md-1 col-lg-1 control-label&#34; Font-Size=&#34;small&#34; Font-Bold=&#34;true&#34;&gt;&lt;/asp:Label&gt; &lt;div class=&#34;col-lg-3 col-md-3&#34;&gt; &lt;asp:DropDownList ID=&#34;drpDepartment&#34; runat=&#34;server&#34; class=&#34;selectpicker&#34; AutoPostBack=&#34;true&#34; data-live-search-style=&#34;begin&#34; data-live-search=&#34;true&#34;&gt; &lt;/asp:DropDownList&gt; &lt;/div&gt; &lt;asp:Label ID=&#34;lblComplience&#34; runat=&#34;server&#34; Text=&#34;Complience Type&#34; CssClass=&#34; col-md-1 col-lg-1 control-label&#34; Font-Size=&#34;small&#34; Font-Bold=&#34;true&#34;&gt;&lt;/asp:Label&gt; &lt;div class=&#34;col-lg-3 col-md-3&#34;&gt; &lt;asp:DropDownList ID=&#34;drpComplience&#34; runat=&#34;server&#34; class=&#34;selectpicker&#34; AutoPostBack=&#34;true&#34; data-live-search-style=&#34;begin&#34; data-live-search=&#34;true&#34;&gt; &lt;/asp:DropDownList&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class=&#34;form-group&#34;&gt; &lt;asp:Label ID=&#34;Label3&#34; runat=&#34;server&#34; Text=&#34;Application&#34; CssClass=&#34; col-md-1 col-lg-1 control-label&#34; Font-Size=&#34;small&#34; Font-Bold=&#34;true&#34;&gt;&lt;/asp:Label&gt; &lt;div class=&#34;col-lg-3 col-md-3&#34;&gt; &lt;asp:DropDownList ID=&#34;drpApplication&#34; runat=&#34;server&#34; class=&#34;selectpicker&#34; AutoPostBack=&#34;true&#34; data-live-search-style=&#34;begin&#34; data-live-search=&#34;true&#34;&gt; &lt;/asp:DropDownList&gt; &lt;/div&gt; &lt;asp:Label ID=&#34;Label5&#34; runat=&#34;server&#34; Text=&#34;Request Type&#34; CssClass=&#34;col-md-1 col-lg-1 control-label&#34; Font-Size=&#34;small&#34; Font-Bold=&#34;true&#34;&gt;&lt;/asp:Label&gt; &lt;div class=&#34;col-lg-3 col-md-3&#34;&gt; &lt;asp:DropDownList ID=&#34;drpRequest_Type&#34; runat=&#34;server&#34; class=&#34;selectpicker&#34; AutoPostBack=&#34;true&#34; data-live-search-style=&#34;begin&#34; data-live-search=&#34;true&#34;&gt; &lt;asp:ListItem&gt;1&lt;/asp:ListItem&gt; &lt;asp:ListItem&gt;2&lt;/asp:ListItem&gt; &lt;asp:ListItem&gt;3&lt;/asp:ListItem&gt; &lt;/asp:DropDownList&gt; &lt;/div&gt; &lt;/div&gt; &lt;/ContentTemplate&gt; &lt;/asp:UpdatePanel&gt; &lt;asp:Label ID=&#34;lblFileUpload&#34; runat=&#34;server&#34; Text=&#34;Status&#34; Visible=&#34;false&#34; CssClass=&#34; col-md-1 col-lg-1 control-label&#34; Font-Size=&#34;small&#34; Font-Bold=&#34;true&#34;&gt;&lt;/asp:Label&gt; &lt;div class=&#34;col-lg-3 col-md-3&#34;&gt; &lt;asp:FileUpload ID=&#34;FileupAttache&#34; runat=&#34;server&#34; AllowMultiple=&#34;true&#34; CssClass=&#34;form-control-sm&#34; /&gt; &lt;/div&gt; &lt;div class=&#34;form-group&#34;&gt; &lt;script type=&#34;text/javascript&#34; src=&#34;//tinymce.cachefly.net/4.0/tinymce.min.js&#34;&gt;&lt;/script&gt; &lt;script src=&#34;js/tinymce.min.js&#34;&gt;&lt;/script&gt; &lt;script type=&#34;text/javascript&#34;&gt; tinymce.init({ selector: &#39;textarea&#39;, height: 200 }); &lt;/script&gt; &lt;div class=&#34;col-md-12 col-lg-12&#34;&gt; &lt;asp:Label ID=&#34;Label8&#34; Text=&#34;Enter Issue details in below textbox&#34; runat=&#34;server&#34; CssClass=&#34;control-label&#34; Font-Bold=&#34;true&#34; /&gt; &lt;/div&gt; &lt;div class=&#34;col-md-12 col-lg-12&#34;&gt; &lt;asp:TextBox ID=&#34;txtIssueDesc&#34; runat=&#34;server&#34; TextMode=&#34;MultiLine&#34; CssClass=&#34;form-control&#34; Placeholder=&#34;Issue&#34; AutoPostBack=&#34;true&#34; /&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class=&#34;form-group&#34;&gt; &lt;div class=&#34;col-md-offset-3 col-lg-offset-3 col-lg-3 col-md-3&#34;&gt; &lt;asp:LinkButton ID=&#34;btnSave&#34; Text=&#34;Save&#34; runat=&#34;server&#34; CssClass=&#34;btn btn-block btn-success btn-md&#34;&gt; &lt;span class=&#34;fa fa fa-paper-plane-o&#34;&gt;&lt;/span&gt;&amp;nbsp;Submit Request &lt;/asp:LinkButton&gt; &lt;/div&gt; &lt;div class=&#34;col-lg-3 col-md-3&#34;&gt; &lt;asp:LinkButton ID=&#34;btnClear&#34; Text=&#34;Clear&#34; runat=&#34;server&#34; CssClass=&#34;btn btn-block btn-md btn-success&#34;&gt; &lt;span class=&#34;fa fa-repeat&#34;&gt;&lt;/span&gt;&amp;nbsp;Clear &lt;/asp:LinkButton&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt;</pre> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/100690/Solved-FileUpload-is-empty-after-UpdatePanel-Partial-Postback-in-ASPNet/https://www.aspforums.net:443/Threads/100690/Solved-FileUpload-is-empty-after-UpdatePanel-Partial-Postback-in-ASPNet/Fri, 14 Jun 2019 05:21:58 GMT