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 (Show) Ajax Rating control after some seconds using JavaScript in ASP.Net<p>Hi <a class="username" rel="Shud">Shud</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;style type=&#34;text/css&#34;&gt; .Star { background-image: url(images/Star.gif); height: 17px; width: 17px; } .WaitingStar { background-image: url(images/WaitingStar.gif); height: 17px; width: 17px; } .FilledStar { background-image: url(images/FilledStar.gif); height: 17px; width: 17px; } &lt;/style&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;script type=&#34;text/javascript&#34;&gt; function Show() { setTimeout(&#39;showData()&#39;, 1000); }; function showData() { document.getElementById(&#34;&lt;%=Rating1.ClientID %&gt;&#34;).style.display = &#34;block&#34;; document.getElementById(&#34;&lt;%=lblRatingStatus.ClientID %&gt;&#34;).style.display = &#34;block&#34;; } &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;form id=&#34;form1&#34; runat=&#34;server&#34;&gt; &lt;cc1:ToolkitScriptManager ID=&#34;ToolkitScriptManager1&#34; runat=&#34;server&#34;&gt; &lt;/cc1:ToolkitScriptManager&gt; &lt;cc1:Rating ID=&#34;Rating1&#34; AutoPostBack=&#34;true&#34; runat=&#34;server&#34; Style=&#34;display: none&#34; CssClass=&#34;rating&#34; StarCssClass=&#34;Star&#34; WaitingStarCssClass=&#34;WaitingStar&#34; EmptyStarCssClass=&#34;Star&#34; FilledStarCssClass=&#34;FilledStar&#34;&gt; &lt;/cc1:Rating&gt; &lt;br /&gt; &lt;asp:Label ID=&#34;lblRatingStatus&#34; runat=&#34;server&#34; Text=&#34;&#34; Style=&#34;display: none&#34;&gt; &lt;/asp:Label&gt; &lt;br /&gt; &lt;asp:Button Text=&#34;Show Rating&#34; runat=&#34;server&#34; OnClick=&#34;Show&#34; /&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 Show(object sender, EventArgs e) { Rating1.CurrentRating = 2; lblRatingStatus.Text = string.Format(&#34;{0} Users have rated. Average Rating {1}&#34;, 5, 1); ClientScript.RegisterStartupScript(this.GetType(), &#34;alert&#34;, &#34;Show();&#34;, true); }</pre> <p><strong>VB.Net</strong></p> <pre class="brush: vb">Protected Sub Show(ByVal sender As Object, ByVal e As EventArgs) Rating1.CurrentRating = 2 lblRatingStatus.Text = String.Format(&#34;{0} Users have rated. Average Rating {1}&#34;, 5, 1) ClientScript.RegisterStartupScript(Me.GetType(), &#34;alert&#34;, &#34;Show();&#34;, True) End Sub</pre> <p><span style="text-decoration: underline;"><strong>Screenshot</strong></span></p> <p><img src="https://i.imgur.com/jFwclHo.gif" alt="" width="273" height="217" /></p>https://www.aspforums.net:443/Threads/106569/Display-Show-Ajax-Rating-control-after-some-seconds-using-JavaScript-in-ASPNet/https://www.aspforums.net:443/Threads/106569/Display-Show-Ajax-Rating-control-after-some-seconds-using-JavaScript-in-ASPNet/Thu, 08 Aug 2019 04:14:47 GMT