Join Dotnetcodes DotnetCodes.com is online Discussion Forum for Software professionals . It lets you find friends around the world and Create professional network that share similar interests as you. Get help on ur projects by industry specialists. Also get answers to all ur technical/placement related querries.Get an edge over others.
Already MemberClick here to login
ASP.net MVC Interview Questions Answers Interview Questions
Serial Number in SSRS Articles
Get Started Developing for Android Apps with Eclipse Articles
How to Print a Crystal Report direct to printer Articles
Razor View Engine Interview Questions Answers Interview Questions
.Net framework 4.0 Interview Questions Answers Interview Questions
SQL server reporting services Interview Questions (SSRS) part 1 Articles
Whats New in ASP.NET 4.0 Part 2 Articles
Difference between Encapsulation and Abstraction Interview Questions
Explaining SDLC -System Development Life Cycle Articles
SPIRE PDF Library Articles
Infosys Interview Questions Interview Questions
Html5 interview questions and answers Interview Questions
Dynamic Menu using HTML List Tag and CSS in ASP.Net Articles
SharePoint 2010 interview Questions Answers Interview Questions
Submit Articles | More Articles..

Hi I would like to write pagination code in web page

Posted By: pramod0211 on 8/29/2010 10:52:33 AM | Comments:2 [Forward This]
Hi friends, I am making e-commerce site for that I want to create category page of of particular product with pagination option at the botom please provide me how to proceed.

Dear Friends, Dont forget to bookmark and submit your posting to social websites listed above.It will bring more visibility, buzz and fast action to attend your post

Responses to the Discussion: Hi I would like to write pagination code in web page
Reply by: rakesh on: 9/1/2010 8:18:13 AM
hi, you can use the following procedure for pagination -- ============================================= Create Proc [dbo].[zmGetPageDebiteurByDebNaam] @DebNaam AS varchar(35), @Startrecord AS Decimal, @EndRecord AS Decimal, @CdActief As varchar AS WITH Pagina AS( SELECT dbo.tblDebiteur.DebNr, dbo.tblDebiteur.Naam, dbo.fncPlaats (DebNr, CdLand, HuisnrNum, PostcdNum, PostcdAlf, PbHuisnrNum, PbPostcdNum, PbPostcdAlf) AS NENPlaats, dbo.tblDebiteur.CdActief, ROW_NUMBER() OVER(ORDER BY dbo.tblDebiteur.Naam) AS RowNr FROM dbo.tblDebiteur WHERE (dbo.tblDebiteur.Naam LIKE @DebNaam + % ) AND CdActief Like @CdActief) SELECT * FROM Pagina WHERE RowNr BETWEEN @Startrecord AND @EndRecord; I hope it will help you.
Reply by: Jaishree on: 8/31/2010 12:47:45 AM
Hi, here is a sample stored procedure code to do pagination, you can get the total number of pages by getting the total count of the results in an inner/outer query. how to show them up on UI, refer total row counts / limit per page gives page counts if results in first/last page doesnt match the limit you need to handle to avoid some problems. ------------------------------------------------------------------------------- -- Procedure name : getTable ------------------------------------------------------------------------------- CREATE PROCEDURE dbo.[getTable] @getID INT, @From INT, @To INT AS BEGIN BEGIN SELECT Results.getID, Results.Name FROM (SELECT getID = A.getID, Name, Row = ROW_NUMBER() OVER (ORDER BY A.getID ASC) FROM dbo.mytable A WHERE (A.getID = @getID)) AS Results WHERE Results.Row BETWEEN @From AND @To END END
 
You have not Logged In,  click here to Login
Reply Here
 
, I agree the terms and conditions of this website
  
  .NET Framework
  ADO.NET
  AJAX
  Android
  ASP.NET
  ASP.NET AJAX
  ASP.NET MVC
  Azure
  Best Practices
  BizTalk Server
  C++
  CSharp
  CSS
  DBMS
  Error and Resolution
  HTML
  IIS
  JAVA
  JavaScript
  JQwery
  JSP
  LINQ
  Management
  Mobile
  ODP.NET
  OOPS
  Oracle
  Others
  Pattern and Practices
  PHP
  SAP
  SEO
  SharePoint
  Silverlight
  Sql Server
  SSAS
  SSIS
  SSRS
  Survey
  UML
  UNIX
  VB
  VB.NET
  VS 2010
  WCF
  Web Analytics
  Windows Forms
  WPF
  WWF
  XML
  XSLT
  .NET Framework
  ADO.NET
  AJAX
  Android
  ASP.NET
  ASP.NET AJAX
  ASP.NET MVC
  Azure
  Best Practices
  BizTalk Server
  C++
  CSharp
  CSS
  DBMS
  Error and Resolution
  HTML
  IIS
  JAVA
  JavaScript
  JQwery
  JSP
  LINQ
  Management
  Mobile
  ODP.NET
  OOPS
  Oracle
  Others
  Pattern and Practices
  PHP
  SAP
  SEO
  SharePoint
  Silverlight
  Sql Server
  SSAS
  SSIS
  SSRS
  Survey
  UML
  UNIX
  VB
  VB.NET
  VS 2010
  WCF
  Web Analytics
  Windows Forms
  WPF
  WWF
  XML
  XSLT

Advertise About Us Private Policy Terms of use
All rights reserved to dotnetcodes. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks.
Best viewed at 1024 x 768 resolution with Internet Explorer 5.0 or Mozila Firefox 3.5 or Google Crome and higher