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.Reusing Bootstrap Modal Popup in Content Page using jQuery<p>I am checking it, I will get back to you soon.</p>https://www.aspforums.net:443/Threads/708220/Reusing-Bootstrap-Modal-Popup-in-Content-Page-using-jQuery/https://www.aspforums.net:443/Threads/708220/Reusing-Bootstrap-Modal-Popup-in-Content-Page-using-jQuery/Wed, 05 Sep 2018 00:06:07 GMTReusing Bootstrap Modal Popup in Content Page using jQuery<p>Hi <a class="username" rel="manionasp">manionasp</a>,</p> <p>Write the modal popup in Master page to show modal popup on multiple content page.</p> <p>Please refer below sample.</p> <p><span style="text-decoration: underline;"><strong>HTML</strong></span></p> <p><strong>MasterPage.master</strong></p> <pre class="brush: html">&lt;%@ Master Language=&#34;C#&#34; AutoEventWireup=&#34;true&#34; CodeFile=&#34;MasterPage.master.cs&#34; Inherits=&#34;MasterPage&#34; %&gt; &lt;!DOCTYPE html PUBLIC &#34;-//W3C//DTD XHTML 1.0 Transitional//EN&#34; &#34;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&#34;&gt; &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;asp:ContentPlaceHolder ID=&#34;head&#34; runat=&#34;server&#34;&gt; &lt;/asp:ContentPlaceHolder&gt; &lt;/head&gt; &lt;body&gt; &lt;form id=&#34;form1&#34; runat=&#34;server&#34;&gt; &lt;div&gt; &lt;script type=&#34;text/javascript&#34; src=&#39;https://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.3.min.js&#39;&gt;&lt;/script&gt; &lt;script type=&#34;text/javascript&#34; src=&#39;https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.0.3/js/bootstrap.min.js&#39;&gt;&lt;/script&gt; &lt;link type=&#34;text/css&#34; rel=&#34;stylesheet&#34; href=&#39;https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.0.3/css/bootstrap.min.css&#39; media=&#34;screen&#34; /&gt; &lt;input type=&#34;button&#34; id=&#34;btnShowLogin&#34; class=&#34;btn btn-primary&#34; value=&#34;Login&#34; /&gt; &lt;script type=&#34;text/javascript&#34;&gt; $(function () { $(&#34;#btnShowLogin&#34;).click(function () { $(&#39;#LoginModal&#39;).modal(&#39;show&#39;); }); }); &lt;/script&gt; &lt;div class=&#34;modal fade&#34; id=&#34;LoginModal&#34; tabindex=&#34;-1&#34; role=&#34;dialog&#34; aria-labelledby=&#34;ModalTitle&#34; aria-hidden=&#34;true&#34;&gt; &lt;div class=&#34;modal-dialog&#34;&gt; &lt;div class=&#34;modal-content&#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; &amp;times; &lt;/button&gt; &lt;h4 class=&#34;modal-title&#34; id=&#34;ModalTitle&#34;&gt; Login&lt;/h4&gt; &lt;/div&gt; &lt;div class=&#34;modal-body&#34;&gt; &lt;label for=&#34;txtUsername&#34;&gt; Username&lt;/label&gt; &lt;asp:TextBox ID=&#34;txtUsername&#34; runat=&#34;server&#34; CssClass=&#34;form-control&#34; placeholder=&#34;Enter Username&#34; required /&gt; &lt;br /&gt; &lt;label for=&#34;txtPassword&#34;&gt; Password&lt;/label&gt; &lt;asp:TextBox ID=&#34;txtPassword&#34; runat=&#34;server&#34; TextMode=&#34;Password&#34; CssClass=&#34;form-control&#34; placeholder=&#34;Enter Password&#34; required /&gt; &lt;div class=&#34;checkbox&#34;&gt; &lt;asp:CheckBox ID=&#34;chkRememberMe&#34; Text=&#34;Remember Me&#34; runat=&#34;server&#34; /&gt; &lt;/div&gt; &lt;div id=&#34;dvMessage&#34; runat=&#34;server&#34; visible=&#34;false&#34; class=&#34;alert alert-danger&#34;&gt; &lt;strong&gt;Error!&lt;/strong&gt; &lt;asp:Label ID=&#34;lblMessage&#34; runat=&#34;server&#34; /&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class=&#34;modal-footer&#34;&gt; &lt;asp:Button ID=&#34;btnLogin&#34; Text=&#34;Login&#34; runat=&#34;server&#34; Class=&#34;btn btn-primary&#34; /&gt; &lt;button type=&#34;button&#34; class=&#34;btn btn-default&#34; data-dismiss=&#34;modal&#34;&gt; Close &lt;/button&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;asp:ContentPlaceHolder ID=&#34;ContentPlaceHolder1&#34; runat=&#34;server&#34;&gt; &lt;/asp:ContentPlaceHolder&gt; &lt;/div&gt; &lt;/form&gt; &lt;/body&gt; &lt;/html&gt; </pre> <p><strong>Default.aspx</strong></p> <pre class="brush: html">&lt;%@ Page Title=&#34;&#34; Language=&#34;C#&#34; MasterPageFile=&#34;~/MasterPage.master&#34; AutoEventWireup=&#34;true&#34; CodeFile=&#34;Default.aspx.cs&#34; Inherits=&#34;_Default&#34; %&gt; &lt;asp:Content ID=&#34;Content1&#34; ContentPlaceHolderID=&#34;head&#34; runat=&#34;Server&#34;&gt; &lt;/asp:Content&gt;</pre> <p><strong>Dafault2.aspx</strong></p> <pre class="brush: html">&lt;%@ Page Title=&#34;&#34; Language=&#34;C#&#34; MasterPageFile=&#34;~/MasterPage.master&#34; AutoEventWireup=&#34;true&#34; CodeFile=&#34;Default2.aspx.cs&#34; Inherits=&#34;Default2&#34; %&gt; &lt;asp:Content ID=&#34;Content1&#34; ContentPlaceHolderID=&#34;head&#34; runat=&#34;Server&#34;&gt; &lt;/asp:Content&gt;</pre> <p><span style="text-decoration: underline;"><strong>Screenshot</strong></span></p> <p><img src="https://i.imgur.com/0Vx3Q4P.gif" alt="" width="346" height="457" /></p>https://www.aspforums.net:443/Threads/708220/Reusing-Bootstrap-Modal-Popup-in-Content-Page-using-jQuery/https://www.aspforums.net:443/Threads/708220/Reusing-Bootstrap-Modal-Popup-in-Content-Page-using-jQuery/Wed, 05 Sep 2018 01:17:12 GMTReusing Bootstrap Modal Popup in Content Page using jQuery<p>can you share the code behind for the masterpage with login events?</p> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/708220/Reusing-Bootstrap-Modal-Popup-in-Content-Page-using-jQuery/https://www.aspforums.net:443/Threads/708220/Reusing-Bootstrap-Modal-Popup-in-Content-Page-using-jQuery/Wed, 05 Sep 2018 10:43:20 GMTReusing Bootstrap Modal Popup in Content Page using jQuery<p>Hi <a class="username" rel="manionasp"> manionasp</a>,</p> <p>You can not ask multiple queries within a question. This is against forum rules and necessary to maintain clean forum.<br />It is requested. Mark Answer the replies when question is answered and ask a new question as a responsible member to help fellow programmers around the world.<br />Note: If you don't mark answers, people will loose interest in your questions.<br /><br />Other Questions you have asked should be asked separately as per the rules of the site. It means a Question should be isolated, you can ask for single Information, issue or error and like so whatever else than this you may ask in separate Queestion.</p>https://www.aspforums.net:443/Threads/708220/Reusing-Bootstrap-Modal-Popup-in-Content-Page-using-jQuery/https://www.aspforums.net:443/Threads/708220/Reusing-Bootstrap-Modal-Popup-in-Content-Page-using-jQuery/Wed, 05 Sep 2018 23:33:49 GMT