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.Display Validation message on current Tab on Next Button Click using jQuery in ASP.Net MVC<p>Hi&nbsp;chetan,</p> <p>Check this example. Now please take its reference and correct your code.</p> <p><strong><span style="text-decoration: underline;">HTML</span></strong></p> <div class="demo_block"> <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;Index&lt;/title&gt; &lt;script type=&#34;text/javascript&#34; src=&#34;https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js&#34;&gt;&lt;/script&gt; &lt;link rel=&#34;stylesheet&#34; href=&#34;https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css&#34; /&gt; &lt;script type=&#34;text/javascript&#34;&gt; $(document).ready(function () { $(&#34;#rws-reg1&#34;).show(); $(&#34;#rws-reg2&#34;).hide(); $(&#34;#rws-reg3&#34;).hide(); $(&#39;#btnNxtEmail&#39;).click(function () { if (NxtEmail_data()) { $(&#34;#rws-reg2&#34;).show(); $(&#34;#rws-reg1&#34;).hide(); $(&#34;#rws-reg3&#34;).hide(); } }); $(&#39;#btnNxtConfirm&#39;).click(function () { $(&#34;#rws-reg3&#34;).show(); $(&#34;#rws-reg1&#34;).hide(); $(&#34;#rws-reg2&#34;).hide(); }); function FUNMessageBox(itemRow, type, w, h, url, control) { //$(&#34;#divMessageContent&#34;).html(itemRow); var wdth = w &gt; 0 ? w : 350; var hght = h &gt; 0 ? h : 200; if (type == &#34;E&#34;) // E = Error { document.getElementById(&#39;divError&#39;).style.display = &#39;&#39;; document.getElementById(&#39;divError&#39;).innerHTML = itemRow; document.getElementById(&#39;divSuccess&#39;).style.display = &#39;none&#39;; document.getElementById(&#39;divQuestion&#39;).style.display = &#39;none&#39;; } if (type == &#34;Q&#34;) // E = Question { document.getElementById(&#39;divQuestion&#39;).style.display = &#39;&#39;; document.getElementById(&#39;divQuestion&#39;).innerHTML = itemRow; document.getElementById(&#39;divError&#39;).style.display = &#39;none&#39;; document.getElementById(&#39;divQuestion&#39;).style.display = &#39;none&#39;; } if (type == &#34;S&#34;) // S = Success { document.getElementById(&#39;divSuccess&#39;).style.display = &#39;&#39;; document.getElementById(&#39;divSuccess&#39;).innerHTML = itemRow; document.getElementById(&#39;divError&#39;).style.display = &#39;none&#39;; document.getElementById(&#39;divQuestion&#39;).style.display = &#39;none&#39;; } } function NxtEmail_data() { var isValid = true; var CustReference = &#34;&#34;, Postcode = &#34;&#34; CustReference = $(&#34;#txtCustomerRef&#34;).val(); Postcode = $(&#34;#txtPostcode&#34;).val(); if (CustReference == &#39;&#39;) { var itemRow = &#34;&lt;ul id=&#39;listError&#39;&gt;&lt;li&gt;&#34; + &#34;Please enter Customer reference number&#34; + &#34;&lt;/li&gt;&lt;/ul&gt;&#34;; FUNMessageBox(itemRow, &#34;E&#34;, 400, 0, &#34;&#34;, &#34;&#34;); isValid = false; return isValid; } if (Postcode == &#39;&#39;) { var itemRow = &#34;&lt;ul id=&#39;listError&#39;&gt;&lt;li&gt;&#34; + &#34;Please enter postcode&#34; + &#34;&lt;/li&gt;&lt;/ul&gt;&#34;; FUNMessageBox(itemRow, &#34;E&#34;, 400, 0, &#34;&#34;, &#34;&#34;); isValid = false; return isValid; } if (isValid) { FUNMessageBox(&#39;&#39;, &#39;E&#39;, 0, 0, &#39;&#39;, &#39;&#39;); } return isValid; } }); &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;div id=&#34;divMessageContent&#34;&gt; &lt;div id=&#34;divError&#34; style=&#34;display: none;&#34;&gt; Error &lt;/div&gt; &lt;div id=&#34;divSuccess&#34; style=&#34;display: none;&#34;&gt; Success &lt;/div&gt; &lt;div id=&#34;divQuestion&#34; style=&#34;display: none;&#34;&gt; Question &lt;/div&gt; &lt;/div&gt; &lt;div class=&#34;registration&#34;&gt; &lt;div class=&#34;limiter rws-main&#34; id=&#34;dvMain&#34;&gt; &lt;div class=&#34;container-login100 rws-login&#34; id=&#34;rws-reg1&#34;&gt; &lt;div class=&#34;wrap-login100 rws-login-wrap&#34;&gt; &lt;form action=&#34;&#34; class=&#34;login100-form validate-form-meter-read rws-meter-read validate-change-password validate-registration&#34; method=&#34;post&#34;&gt; &lt;span class=&#34;login100-form-title rws-form-title&#34;&gt;Account Details &lt;/span&gt; &lt;div class=&#34;wrap-input100&#34;&gt; &lt;p class=&#34;rws-formp&#34;&gt; Customer Reference:&lt;span style=&#34;color: Red&#34;&gt;*&lt;/span&gt;&lt;/p&gt; &lt;input id=&#34;txtCustomerRef&#34; class=&#34;input100&#34; type=&#34;text&#34; name=&#34;custRef&#34; placeholder=&#34;Customer Reference&#34; autocomplete=&#34;off&#34; /&gt; &lt;a href=&#34;#&#34; data-toggle=&#34;popover&#34; title=&#34;&#34; data-placement=&#34;right&#34; data-html=&#34;true&#34; data-content=&#34;&lt;p&gt;Your customer reference number is shown on your bill.&lt;/p&gt;&#34; data-original-title=&#34;&#34; /&gt; &lt;i class=&#34;fa fa-question-circle&#34; style=&#34;font-size: 20px; color: purple; margin-left: 5px;&#34;&gt; &lt;/i&gt;&lt;/a&gt; &lt;/div&gt; &lt;div class=&#34;wrap-input100&#34;&gt; &lt;p class=&#34;rws-formp&#34;&gt; Postcode:&lt;span style=&#34;color: Red&#34;&gt;*&lt;/span&gt;&lt;/p&gt; &lt;input id=&#34;txtPostcode&#34; class=&#34;input100&#34; type=&#34;text&#34; name=&#34;postcode&#34; placeholder=&#34;Postcode&#34; autocomplete=&#34;off&#34; /&gt; &lt;/div&gt; &lt;div class=&#34;container-login100-form-btn rws-form-btn&#34;&gt; &lt;button type=&#34;button&#34; id=&#34;btnNxtEmail&#34; class=&#34;login100-form-btn rws-sbmtbtn&#34;&gt; &lt;a href=&#34;#reg2&#34;&gt;Next&lt;/a&gt; &lt;/button&gt; &lt;/div&gt; &lt;/form&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class=&#34;container-login100 rws-login&#34; id=&#34;rws-reg2&#34;&gt; &lt;div class=&#34;wrap-login100 rws-login-wrap&#34;&gt; &lt;form action=&#34;Login.html&#34; class=&#34;login100-form validate-form-meter-read rws-meter-read validate-change-password validate-registration&#34; method=&#34;post&#34;&gt; &lt;span class=&#34;login100-form-title rws-form-title&#34;&gt;My Details &lt;/span&gt; &lt;div class=&#34;wrap-input100&#34;&gt; &lt;p class=&#34;rws-formp&#34;&gt; Email Address:&lt;span style=&#34;color: Red&#34;&gt;*&lt;/span&gt;&lt;/p&gt; &lt;input id=&#34;txtEmail&#34; class=&#34;input100&#34; type=&#34;text&#34; name=&#34;email&#34; placeholder=&#34;Email Address&#34; autocomplete=&#34;off&#34; /&gt; &lt;/div&gt; &lt;div class=&#34;wrap-input100&#34;&gt; &lt;p class=&#34;rws-formp&#34;&gt; Password:&lt;span style=&#34;color: Red&#34;&gt;*&lt;/span&gt;&lt;/p&gt; &lt;input id=&#34;txtPassword&#34; class=&#34;input100&#34; type=&#34;password:&#34; name=&#34;password:&#34; placeholder=&#34;Password:&#34; autocomplete=&#34;off&#34; /&gt; &lt;/div&gt; &lt;div class=&#34;wrap-input100&#34;&gt; &lt;p class=&#34;rws-formp&#34;&gt; Confirm Password:&lt;span style=&#34;color: Red&#34;&gt;*&lt;/span&gt;&lt;/p&gt; &lt;input id=&#34;txtConfirmPswd&#34; class=&#34;input100&#34; type=&#34;password:&#34; name=&#34;confirmpassword:&#34; placeholder=&#34;Confirm Password:&#34; autocomplete=&#34;off&#34; /&gt; &lt;/div&gt; &lt;div class=&#34;container-login100-form-btn rws-form-btn&#34;&gt; &lt;button id=&#34;btnNxtConfirm&#34; class=&#34;login100-form-btn rws-sbmtbtn&#34;&gt; &lt;a href=&#34;#reg3&#34;&gt;Next&lt;/a&gt; &lt;/button&gt; &lt;/div&gt; &lt;/form&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class=&#34;container-login100 rws-login&#34; id=&#34;rws-reg3&#34;&gt; &lt;div class=&#34;wrap-login100 rws-login-wrap&#34;&gt; &lt;form action=&#34;Login.html&#34; class=&#34;login100-form validate-form-meter-read rws-meter-read validate-change-password validate-registration&#34; method=&#34;post&#34;&gt; &lt;span class=&#34;login100-form-title rws-form-title&#34;&gt;Confirm &lt;/span&gt; &lt;div class=&#34;wrap-input100 check&#34;&gt; &lt;input id=&#34;Isconsentchecked&#34; type=&#34;checkbox&#34; value=&#34;true&#34; name=&#34;Isconsentchecked&#34; /&gt; &lt;input name=&#34;Isconsentchecked&#34; type=&#34;hidden&#34; value=&#34;false&#34; /&gt; &lt;span&gt;I consent to Symbio Energy staying in touch with me, including by email and SMS text, to let me know about new services, deals and offers.&lt;/span&gt; &lt;/div&gt; &lt;div class=&#34;wrap-input100&#34;&gt; &lt;p&gt; &lt;strong&gt;Terms and Conditions&lt;/strong&gt;&lt;/p&gt; &lt;p style=&#34;text-align: justify&#34;&gt; Last updated: (10/09/2018) &lt;br /&gt; Please read these Terms and Conditions carefully before using the &lt;span style=&#34;text-decoration: underline; color: #3366ff;&#34;&gt;http://symbioenergy.co.uk/&lt;/span&gt; website operated by &lt;strong&gt;Symbio Energy Ltd&lt;/strong&gt;. &lt;br /&gt; Your access to and use of the Service is conditioned on your acceptance of and compliance with these Terms. These Terms apply to all visitors, users and others who access or use the Service.&lt;br&gt; By accessing or using the Service you agree to be bound by these Terms. If you disagree with any part of the terms then you may not access the Service. &lt;/p&gt; &lt;p&gt; &lt;strong&gt;Content&lt;/strong&gt;&lt;/p&gt; &lt;p style=&#34;text-align: justify&#34;&gt; In these Website Standard Terms and Conditions, &ldquo;Your Content&rdquo; shall mean any audio, video text, images or other material you choose to display on this Website. By displaying Your Content, you grant &lt;strong&gt;Symbio Energy Ltd&lt;/strong&gt;&amp;nbsp;a non-exclusive, worldwide irrevocable, sub licensable license to use, reproduce, adapt, publish, translate and distribute it in any and all media. &lt;/p&gt; &lt;p style=&#34;text-align: justify&#34;&gt; Your Content must be your own and must not be invading any third-party&#39;s rights. &lt;strong&gt;Symbio Energy Ltd&lt;/strong&gt;&amp;nbsp;reserves the right to remove any of Your Content from this Website at any time without notice. &lt;/p&gt; &lt;p&gt; &lt;strong&gt;Changes&lt;/strong&gt;&lt;/p&gt; &lt;p style=&#34;text-align: justify&#34;&gt; We reserve the right, at our sole discretion, to modify or replace these Terms at any time. If a revision is material we will try to provide at least 30 days&#39; notice prior to any new terms taking effect. What constitutes a material change will be determined at our sole discretion. &lt;/p&gt; &lt;p&gt; &lt;strong&gt;Contact Us&lt;/strong&gt;&lt;/p&gt; &lt;p&gt; If you have any questions about these Terms, please contact us. &lt;/p&gt; &lt;/div&gt; &lt;div class=&#34;wrap-input100 check&#34;&gt; &lt;input id=&#34;IsTermsConditionsChecked&#34; type=&#34;checkbox&#34; value=&#34;true&#34; name=&#34;IsTermsConditionsChecked&#34; /&gt; &lt;span&gt;I agree to Symbio energy&#39;s terms of use&lt;/span&gt; &lt;/div&gt; &lt;div class=&#34;container-login100-form-btn rws-form-btn&#34;&gt; &lt;button type=&#34;button&#34; id=&#34;btnConfirm&#34; class=&#34;login100-form-btn rws-sbmtbtn&#34;&gt; &lt;a href=&#34;Login.html&#34;&gt;Confirm&lt;/a&gt; &lt;/button&gt; &lt;/div&gt; &lt;/form&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt;</pre> </div> <p><a class="demo button orange btn btn-red">Demo</a></p>https://www.aspforums.net:443/Threads/128669/Display-Validation-message-on-current-Tab-on-Next-Button-Click-using-jQuery-in-ASPNet-MVC/https://www.aspforums.net:443/Threads/128669/Display-Validation-message-on-current-Tab-on-Next-Button-Click-using-jQuery-in-ASPNet-MVC/Tue, 06 Aug 2019 03:23:50 GMT