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.Implement Infinite Scroll in ASP.Net using jQuery AJAX and LinqHi @Pushpa,<br />Please try the following<br /><br /><a href = 'link(Threads/105785/Implement-Infinite-Scroll-on-Nested-Repeater-using-jQuery-AJAX-in-ASPNet/)'>Implement Infinite Scroll on Nested Repeater using jQuery AJAX in ASP.Net</a><br /><br />It might help you.<br /><br />Cheers Andrea.https://www.aspforums.net:443/Threads/185334/Implement-Infinite-Scroll-in-ASPNet-using-jQuery-AJAX-and-Linq/https://www.aspforums.net:443/Threads/185334/Implement-Infinite-Scroll-in-ASPNet-using-jQuery-AJAX-and-Linq/Tue, 21 Aug 2018 06:29:09 GMTImplement Infinite Scroll in ASP.Net using jQuery AJAX and Linq<p>Hi <a class="username" rel="Pushpa"> Pushpa</a>,</p> <p>For calling stored procedure using entity framework refer below article.</p> <h1 class="header"><a title="Call and execute a Stored Procedure in Entity Framework in ASP.Net using C# and VB.Net'a" href="https://www.aspsnippets.com/Articles/Call-and-execute-a-Stored-Procedure-in-Entity-Framework-in-ASPNet-using-C-and-VBNet.aspx">Call and execute a Stored Procedure in Entity Framework in ASP.Net using C# and VB.Net</a></h1> <p><strong><span style="text-decoration: underline;">HTML</span></strong></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;script type=&#34;text/javascript&#34; src=&#34;http://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; var pageIndex = 1; var pageCount; $(window).scroll(function () { if ($(window).scrollTop() == $(document).height() - $(window).height()) { GetRecords(); } }); function GetRecords() { pageIndex++; if (pageIndex == 2 || pageIndex &lt;= pageCount) { $(&#34;#loader&#34;).show(); $.ajax({ type: &#34;POST&#34;, url: &#34;CS.aspx/GetCustomers&#34;, data: &#39;{pageIndex: &#39; + pageIndex + &#39;}&#39;, contentType: &#34;application/json; charset=utf-8&#34;, dataType: &#34;json&#34;, success: OnSuccess, failure: function (response) { alert(response.d); }, error: function (response) { alert(response.d); } }); } } function OnSuccess(response) { var xmlDoc = $.parseXML(response.d); var xml = $(xmlDoc); pageCount = parseInt(xml.find(&#34;PageCount&#34;).eq(0).find(&#34;PageCount&#34;).text()); var customers = xml.find(&#34;Customers&#34;); customers.each(function (index, item) { if (index &gt; 0) { var customer = $(this); var table = $(&#34;#dvCustomers table&#34;).eq(0).clone(true); $(&#34;.name&#34;, table).html(customer.find(&#34;ContactName&#34;).text()); $(&#34;.city&#34;, table).html(customer.find(&#34;City&#34;).text()); $(&#34;.postal&#34;, table).html(customer.find(&#34;PostalCode&#34;).text()); $(&#34;.country&#34;, table).html(customer.find(&#34;Country&#34;).text()); $(&#34;.phone&#34;, table).html(customer.find(&#34;Phone&#34;).text()); $(&#34;.fax&#34;, table).html(customer.find(&#34;Fax&#34;).text()); $(&#34;#dvCustomers&#34;).append(table).append(&#34;&lt;br /&gt;&#34;); } }); $(&#34;#loader&#34;).hide(); } &lt;/script&gt; &lt;/head&gt; &lt;body style=&#34;font-family: Arial; font-size: 10pt&#34;&gt; &lt;form id=&#34;form1&#34; runat=&#34;server&#34;&gt; &lt;table&gt; &lt;tr&gt; &lt;td&gt; &lt;div id=&#34;dvCustomers&#34;&gt; &lt;asp:Repeater ID=&#34;rptCustomers&#34; runat=&#34;server&#34;&gt; &lt;ItemTemplate&gt; &lt;table cellpadding=&#34;2&#34; cellspacing=&#34;0&#34; border=&#34;1&#34; style=&#34;width: 200px; height: 100px; border: dashed 2px #04AFEF; background-color: #B0E2F5&#34;&gt; &lt;tr&gt; &lt;td&gt; &lt;b&gt;&lt;u&gt;&lt;span class=&#34;name&#34;&gt; &lt;%# Eval(&#34;ContactName&#34;) %&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;b&gt;City: &lt;/b&gt;&lt;span class=&#34;city&#34;&gt; &lt;%# Eval(&#34;City&#34;) %&gt;&lt;/span&gt;&lt;br /&gt; &lt;b&gt;Postal Code: &lt;/b&gt;&lt;span class=&#34;postal&#34;&gt; &lt;%# Eval(&#34;PostalCode&#34;) %&gt;&lt;/span&gt;&lt;br /&gt; &lt;b&gt;Country: &lt;/b&gt;&lt;span class=&#34;country&#34;&gt; &lt;%# Eval(&#34;Country&#34;)%&gt;&lt;/span&gt;&lt;br /&gt; &lt;b&gt;Phone: &lt;/b&gt;&lt;span class=&#34;phone&#34;&gt; &lt;%# Eval(&#34;Phone&#34;)%&gt;&lt;/span&gt;&lt;br /&gt; &lt;b&gt;Fax: &lt;/b&gt;&lt;span class=&#34;fax&#34;&gt; &lt;%# Eval(&#34;Fax&#34;)%&gt;&lt;/span&gt;&lt;br /&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;br /&gt; &lt;/ItemTemplate&gt; &lt;/asp:Repeater&gt; &lt;/div&gt; &lt;/td&gt; &lt;td valign=&#34;bottom&#34;&gt; &lt;img id=&#34;loader&#34; alt=&#34;&#34; src=&#34;loading.gif&#34; style=&#34;display: none&#34; /&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/form&gt; &lt;/body&gt; &lt;/html&gt;</pre> <p><strong><span style="text-decoration: underline;">Namespaces</span></strong></p> <pre class="brush: csharp">using System.Data; using System.Data.SqlClient; using System.Web.Services; using System.Configuration; using NorthwindModel; using System.Data.Objects;</pre> <p><strong><span style="text-decoration: underline;">C#</span></strong></p> <pre class="brush: csharp">protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { rptCustomers.DataSource = GetCustomersData(1); rptCustomers.DataBind(); } } public static DataSet GetCustomersData(int pageIndex) { NorthwindEntities entities = new NorthwindEntities(); ObjectParameter pageCount = new ObjectParameter(&#34;PageCount&#34;, typeof(int)); var result = entities.CustomerPager(pageIndex, 10, pageCount); DataTable dt = new DataTable(&#34;Customers&#34;); dt.Columns.Add(&#34;CustomerID&#34;, typeof(string)); dt.Columns.Add(&#34;ContactName&#34;, typeof(string)); dt.Columns.Add(&#34;CompanyName&#34;, typeof(string)); dt.Columns.Add(&#34;City&#34;, typeof(string)); dt.Columns.Add(&#34;Country&#34;, typeof(string)); dt.Columns.Add(&#34;PostalCode&#34;, typeof(string)); dt.Columns.Add(&#34;Phone&#34;, typeof(string)); dt.Columns.Add(&#34;Fax&#34;, typeof(string)); foreach (var item in result) { DataRow row = dt.NewRow(); row[&#34;CustomerID&#34;] = item.CustomerID; row[&#34;ContactName&#34;] = item.ContactName; row[&#34;CompanyName&#34;] = item.CompanyName; row[&#34;City&#34;] = item.City; row[&#34;Country&#34;] = item.Country; row[&#34;PostalCode&#34;] = item.PostalCode; row[&#34;Phone&#34;] = item.Phone; row[&#34;Fax&#34;] = item.Fax; dt.Rows.Add(row); } using (DataSet ds = new DataSet(&#34;Customers&#34;)) { ds.Tables.Add(dt); DataTable dt1 = new DataTable(&#34;PageCount&#34;); dt1.Columns.Add(&#34;PageCount&#34;); dt1.Rows.Add(); dt1.Rows[0][0] = Convert.ToInt32(pageCount.Value); ds.Tables.Add(dt1); return ds; } } [WebMethod] public static string GetCustomers(int pageIndex) { return GetCustomersData(pageIndex).GetXml(); }</pre>https://www.aspforums.net:443/Threads/185334/Implement-Infinite-Scroll-in-ASPNet-using-jQuery-AJAX-and-Linq/https://www.aspforums.net:443/Threads/185334/Implement-Infinite-Scroll-in-ASPNet-using-jQuery-AJAX-and-Linq/Tue, 21 Aug 2018 08:24:42 GMTImplement Infinite Scroll in ASP.Net using jQuery AJAX and Linq<p>Hello, &nbsp; I am trying to solve my Problem using your solution and using Entity Framework I am not getting Columns for below stored procedure.</p> <pre class="brush: sql">SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO -- ============================================= CREATE PROCEDURE GetCustomersPageWise @PageIndex INT = 1 ,@PageSize INT = 10 ,@RecordCount INT OUTPUT AS BEGIN SET NOCOUNT ON; SELECT ROW_NUMBER() OVER ( ORDER BY [CustomerID] ASC )AS RowNumber ,[CustomerID] ,[CompanyName] ,[ContactName] INTO #Results FROM [Customers] SELECT @RecordCount = COUNT(*) FROM #Results SELECT * FROM #Results WHERE RowNumber BETWEEN(@PageIndex -1) * @PageSize + 1 AND(((@PageIndex -1) * @PageSize + 1) + @PageSize) - 1 DROP TABLE #Results END GO</pre>https://www.aspforums.net:443/Threads/185334/Implement-Infinite-Scroll-in-ASPNet-using-jQuery-AJAX-and-Linq/https://www.aspforums.net:443/Threads/185334/Implement-Infinite-Scroll-in-ASPNet-using-jQuery-AJAX-and-Linq/Tue, 21 Aug 2018 12:09:46 GMTImplement Infinite Scroll in ASP.Net using jQuery AJAX and Linq<blockquote><cite>Pushpa says:</cite> <pre>I am not getting Columns for below stored procedure.</pre> </blockquote> <p>&nbsp;Will you please explain the above statement in more details.</p>https://www.aspforums.net:443/Threads/185334/Implement-Infinite-Scroll-in-ASPNet-using-jQuery-AJAX-and-Linq/https://www.aspforums.net:443/Threads/185334/Implement-Infinite-Scroll-in-ASPNet-using-jQuery-AJAX-and-Linq/Wed, 22 Aug 2018 23:51:48 GMT