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 expiry notification in Modal Popup after Login using jQuery in ASP.Net<p>Hi <a class="username" rel="sathya2496">sathya2496</a>,</p> <p>Refer below code and accordingly to your database data check condition and open popup message.</p> <p><span style="text-decoration: underline;"><strong>HTML</strong></span></p> <pre class="brush: html">&lt;script type=&#34;text/javascript&#34; src=&#34;http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js&#34;&gt;&lt;/script&gt; &lt;script src=&#34;http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.9/jquery-ui.js&#34; type=&#34;text/javascript&#34;&gt;&lt;/script&gt; &lt;link href=&#34;http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.9/themes/start/jquery-ui.css&#34; rel=&#34;stylesheet&#34; type=&#34;text/css&#34; /&gt; &lt;script type=&#34;text/javascript&#34;&gt; function OpenModal() { $(&#34;#dialog&#34;).dialog({ autoOpen: true, modal: true, title: &#34;Expiring&#34;, buttons: { Ok: function () { $(this).dialog(&#39;close&#39;); } } }); } &lt;/script&gt; &lt;div id=&#34;dialog&#34; style=&#34;display: none;&#34;&gt; Your Product will expire in&amp;nbsp;&lt;span runat=&#34;server&#34; id=&#34;date&#34;&gt;&lt;/span&gt; &lt;/div&gt;</pre> <p><span style="text-decoration: underline;"><strong>Code</strong></span></p> <p><strong>C#</strong></p> <pre class="brush: csharp">protected void Page_Load(object sender, EventArgs e) { if (!this.IsPostBack) { // Database Datetime. DateTime dbDate = new DateTime(2019, 07, 23); if (dbDate.AddDays(3).ToString(&#34;dd/MM/yyyy HH:mm&#34;) == DateTime.Now.AddDays(1).ToString(&#34;dd/MM/yyyy HH:mm&#34;)) { date.InnerText = DateTime.Now.AddDays(1).Subtract(dbDate).Days + &#34; days.&#34;; ScriptManager.RegisterStartupScript(this, this.GetType(), &#34;&#34;, &#34;OpenModal();&#34;, true); } } }</pre> <p><strong>VB.Net</strong></p> <pre class="brush: vb">Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)Handle Me.Load If Not Me.IsPostBack Then ' Database Datetime. Dim dbDate As DateTime = New DateTime(2019, 07, 23) If dbDate.AddDays(3).ToString("dd/MM/yyyy HH:mm") = DateTime.Now.AddDays(1).ToString("dd/MM/yyyy HH:mm") Then date.InnerText = DateTime.Now.AddDays(1).Subtract(dbDate).Days &amp; " days." ScriptManager.RegisterStartupScript(Me, Me.GetType(), "", "OpenModal();", True) End If End If End Sub</pre>https://www.aspforums.net:443/Threads/300879/Display-expiry-notification-in-Modal-Popup-after-Login-using-jQuery-in-ASPNet/https://www.aspforums.net:443/Threads/300879/Display-expiry-notification-in-Modal-Popup-after-Login-using-jQuery-in-ASPNet/Thu, 25 Jul 2019 08:24:55 GMT