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] ASP.Net FileUpload control not working inside Bootstrap Model Popup<p>Hi <a class="username" rel="IamAzhar"> IamAzhar</a>,</p> <p>Refer below sample.</p> <p><span style="text-decoration: underline;"><strong>HTML</strong></span></p> <pre class="brush: html">&lt;html xmlns=&#34;http://www.w3.org/1999/xhtml&#34;&gt; &lt;head runat=&#34;server&#34;&gt; &lt;title&gt;&lt;/title&gt; &lt;script type=&#34;text/javascript&#34; src=&#34;http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js&#34;&gt;&lt;/script&gt; &lt;script type=&#34;text/javascript&#34; src=&#34;http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js&#34;&gt;&lt;/script&gt; &lt;link rel=&#34;stylesheet&#34; href=&#34;http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css&#34; /&gt; &lt;/head&gt; &lt;body&gt; &lt;form id=&#34;form1&#34; runat=&#34;server&#34;&gt; &lt;div&gt; &lt;button type=&#34;button&#34; class=&#34;btn btn-info btn-lg&#34; data-toggle=&#34;modal&#34; data-target=&#34;#MyPopup&#34;&gt; Open Modal&lt;/button&gt; &lt;div id=&#34;MyPopup&#34; class=&#34;modal fade&#34; role=&#34;dialog&#34;&gt; &lt;div class=&#34;modal-dialog&#34;&gt; &lt;div class=&#34;modal-header&#34;&gt; &lt;button type=&#34;button&#34; class=&#34;close&#34; data-dismiss=&#34;modal&#34; aria-hidden=&#34;true&#34;&gt; x&lt;/button&gt; &lt;h3&gt; Detail&lt;/h3&gt; &lt;/div&gt; &lt;div class=&#34;modal-body&#34;&gt; &lt;div class=&#34;row&#34;&gt; &lt;div class=&#34;col-md-12&#34;&gt; &lt;div class=&#34;form-group&#34;&gt; &lt;asp:FileUpload ID=&#34;idFileUpload&#34; runat=&#34;server&#34; /&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class=&#34;modal-footer&#34;&gt; &lt;asp:Button ID=&#34;btnSubmit&#34; runat=&#34;server&#34; Text=&#34;Save&#34; CssClass=&#34;btn btn-success&#34; OnClick=&#34;btnSubmit_Click&#34; /&gt; &lt;button class=&#34;btn btn-info&#34; data-dismiss=&#34;modal&#34; aria-hidden=&#34;true&#34;&gt; Close&lt;/button&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/form&gt; &lt;/body&gt; &lt;/html&gt;</pre> <p><span style="text-decoration: underline;"><strong>Code</strong></span></p> <p><strong>C#</strong></p> <pre class="brush: csharp">protected void btnSubmit_Click(object sender, EventArgs e) { ScriptManager.RegisterStartupScript(this, this.GetType(), &#34; &#34;, &#34;alert(&#39;&#34; + idFileUpload.PostedFile.FileName + &#34;&#39;);&#34;, true); }</pre> <p><strong>VB.Net</strong></p> <pre class="brush: vb">Protected Sub btnSubmit_Click(ByVal sender As Object, ByVal e As EventArgs) ScriptManager.RegisterStartupScript(Me, Me.GetType(), &#34; &#34;, &#34;alert(&#39;&#34; &amp; idFileUpload.PostedFile.FileName &amp; &#34;&#39;);&#34;, True) End Sub</pre> <p><span style="text-decoration: underline;"><strong>Screenshot</strong></span></p> <p><span style="text-decoration: underline;"><strong><img src="https://i.imgur.com/xbqiDgl.gif" alt="" width="379" height="345" /></strong></span></p>https://www.aspforums.net:443/Threads/132665/Solved-ASPNet-FileUpload-control-not-working-inside-Bootstrap-Model-Popup/https://www.aspforums.net:443/Threads/132665/Solved-ASPNet-FileUpload-control-not-working-inside-Bootstrap-Model-Popup/Mon, 08 Jul 2019 00:38:15 GMT