hi sir
i tried your code for binding data on page scrolling.It's all working fine just want to ask you ,how can i retrive distinct set of records from procedure?
*********here my code*******
SELECT ROW_NUMBER() OVER
(
ORDER BY a.ProductId ASC
)AS RowNumber
,a.ProductId
,a.ProductName
,a.Manufacturer
,a.Product_Status
,a.txtVariant_Name
,a.txtVariant_Unit
,a.txtVariant_Value
,a.Price_MRP,Isnull(a.txtImage1_Url,'img/Organikong.jpg') as txtImage1_Url
into #Results2
from dbo.table1 a
inner JOIN table2 b ON a.ProductName = b.ProductName
left outer JOIN table3 c ON b.VendorId = c.VendorId
where a.Pro_CategorytName=@CName and Ven_Pincode in(@Pincode,XXXXX)
DECLARE @RecordCount3 INT
SELECT @RecordCount3 = COUNT(*) FROM #Results2
SET @PageCount = CEILING(CAST(@RecordCount3 AS DECIMAL(10, 2)) / CAST(@PageSize AS DECIMAL(10, 2)))
PRINT @PageCount
SELECT * FROM #Results2
WHERE RowNumber BETWEEN(@PageIndex -1) * @PageSize + 1 AND(((@PageIndex -1) * @PageSize + 1) + @PageSize) - 1
DROP TABLE #Results2