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.Call server side Method from JavaScript after Timer count down end in ASP.Net<p>Hi <a class="username" rel="paulrajmca"> paulrajmca</a>,</p> <p>Check this example. Now please take its reference and correct your code.</p> <p>For calling code behind method from client side refer below article.</p> <h1 class="header"><a title="Call Code Behind function from Client Side (JavaScript) in ASP.Net'a" href="https://www.aspsnippets.com/Articles/Call-Code-Behind-function-from-Client-Side-JavaScript-in-ASPNet.aspx">Call Code Behind function from Client Side (JavaScript) in ASP.Net</a></h1> <p><strong><span style="text-decoration: underline;">HTML</span></strong></p> <pre class="brush: html">&lt;asp:ScriptManager ID=&#34;ScriptManager1&#34; runat=&#34;server&#34; EnablePageMethods=&#34;true&#34;&gt; &lt;/asp:ScriptManager&gt; &lt;h3&gt; Session Time &lt;span id=&#34;countdown&#34;&gt;10&lt;/span&gt; seconds &lt;/h3&gt; &lt;asp:Label ID=&#34;lbl&#34; runat=&#34;server&#34; /&gt; &lt;script type=&#34;text/javascript&#34;&gt; var seconds = 3; function countdown() { seconds = seconds - 1; if (seconds &lt; 0) { PageMethods.name(function (response, userContext, methodName) { document.getElementById(&#34;&lt;%=lbl.ClientID%&gt;&#34;).innerHTML = response; }); } else { document.getElementById(&#34;countdown&#34;).innerHTML = seconds; window.setTimeout(&#34;countdown()&#34;, 1000); } } countdown(); &lt;/script&gt;</pre> <p><strong><span style="text-decoration: underline;">C#</span></strong></p> <pre class="brush: csharp">[System.Web.Services.WebMethod] public static string name() { return &#34;Paul Raj&#34;; }</pre> <p><strong><span style="text-decoration: underline;">Screenshot</span></strong></p> <p><img src="https://imgur.com/sdECvYv.gif" alt="" width="248" height="148" /></p> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/436173/Call-server-side-Method-from-JavaScript-after-Timer-count-down-end-in-ASPNet/https://www.aspforums.net:443/Threads/436173/Call-server-side-Method-from-JavaScript-after-Timer-count-down-end-in-ASPNet/Mon, 22 Oct 2018 00:51:36 GMT