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.Scroll to end of Panel on PageLoad using jQuery in ASP.Net<p>Hi <a class="username" rel="nauna">nauna</a>,</p> <p>Please refer below sample.</p> <p><span style="text-decoration: underline;"><strong>HTML</strong></span></p> <pre class="brush: html">&lt;asp:Panel ID=&#34;pnlScroll&#34; runat=&#34;server&#34; Style=&#34;overflow: scroll; overflow-x: hidden; max-height: 100px; width: 50%&#34;&gt; &lt;asp:ListView ID=&#34;ListView1&#34; runat=&#34;server&#34; GroupPlaceholderID=&#34;groupPlaceHolder1&#34; ItemPlaceholderID=&#34;itemPlaceHolder1&#34;&gt; &lt;LayoutTemplate&gt; &lt;table cellpadding=&#34;&#34; cellspacing=&#34;0&#34; border=&#34;1&#34; width=&#34;50%&#34;&gt; &lt;asp:PlaceHolder runat=&#34;server&#34; ID=&#34;groupPlaceHolder1&#34;&gt;&lt;/asp:PlaceHolder&gt; &lt;/table&gt; &lt;/LayoutTemplate&gt; &lt;GroupTemplate&gt; &lt;tr&gt; &lt;asp:PlaceHolder runat=&#34;server&#34; ID=&#34;itemPlaceHolder1&#34;&gt;&lt;/asp:PlaceHolder&gt; &lt;/tr&gt; &lt;/GroupTemplate&gt; &lt;ItemTemplate&gt; &lt;td&gt; &lt;asp:Label ID=&#34;lblName&#34; runat=&#34;server&#34; Text=&#39;&lt;%# Eval(&#34;Name&#34;) %&gt;&#39;&gt;&lt;/asp:Label&gt; &lt;/td&gt; &lt;td&gt; &lt;asp:Label ID=&#34;lblStatus&#34; runat=&#34;server&#34; Text=&#39;&lt;%# Eval(&#34;Status&#34;) %&gt;&#39;&gt;&lt;/asp:Label&gt; &lt;/td&gt; &lt;/ItemTemplate&gt; &lt;/asp:ListView&gt; &lt;/asp:Panel&gt; &lt;script type=&#34;text/javascript&#34; src=&#34;https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js&#34;&gt;&lt;/script&gt; &lt;script type=&#34;text/javascript&#34;&gt; $(function () { $(&#39;#pnlScroll&#39;).scrollTop($(&#39;#pnlScroll&#39;)[0].scrollHeight); }); &lt;/ script&gt;</pre> <p><span style="text-decoration: underline;"><strong>Namespaces</strong></span></p> <pre class="brush: csharp">using System; using System.Data;</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 (!IsPostBack) { this.BindListView(); } } private void BindListView() { DataTable dt = new DataTable(); dt = new DataTable(); dt.Columns.AddRange(new DataColumn[2] { new DataColumn(&#34;Name&#34;), new DataColumn(&#34;Status&#34;) }); dt.Rows.Add(&#34;John&#34;, &#34;Pending&#34;); dt.Rows.Add(&#34;Rick&#34;, &#34;Complete&#34;); dt.Rows.Add(&#34;Andrew&#34;, &#34;Complete&#34;); dt.Rows.Add(&#34;Peter&#34;, &#34;Pending&#34;); dt.Rows.Add(&#34;Mudassar&#34;, &#34;Complete&#34;); dt.Rows.Add(&#34;John&#34;, &#34;Pending&#34;); dt.Rows.Add(&#34;Rick&#34;, &#34;Complete&#34;); dt.Rows.Add(&#34;Andrew&#34;, &#34;Complete&#34;); dt.Rows.Add(&#34;Peter&#34;, &#34;Pending&#34;); dt.Rows.Add(&#34;Mudassar&#34;, &#34;Complete&#34;); dt.Rows.Add(&#34;John&#34;, &#34;Pending&#34;); dt.Rows.Add(&#34;Rick&#34;, &#34;Complete&#34;); dt.Rows.Add(&#34;Andrew&#34;, &#34;Complete&#34;); dt.Rows.Add(&#34;Peter&#34;, &#34;Pending&#34;); dt.Rows.Add(&#34;Mudassar&#34;, &#34;Complete&#34;); this.ListView1.DataSource = dt; this.ListView1.DataBind(); }</pre> <p><span style="text-decoration: underline;"><strong>Screenshot</strong></span></p> <p><img src="https://i.imgur.com/hkoDBLM.gif" alt="" width="323" height="190" /></p>https://www.aspforums.net:443/Threads/715259/Scroll-to-end-of-Panel-on-PageLoad-using-jQuery-in-ASPNet/https://www.aspforums.net:443/Threads/715259/Scroll-to-end-of-Panel-on-PageLoad-using-jQuery-in-ASPNet/Wed, 05 Sep 2018 06:40:53 GMT