title: Standalone paging control in ASP.NET
body: <p>Project : ASP.NET 3.5</p>
  
  <p>Server : SQL Server 2008</p>
  
  <p>One of the page in the project is used to list all log entry(including errors, information etc). So the there will be huge amount of records to list.</p>
  
  <p>I would like to create a 'Pager' user control so that I can use it everywhere. I cannot use pager provided by ASP.NET, because the pager may have lot of additional functionality(such as SelectAllRecords etc).
  So for 'LogListPage', I will call GetLogInfo() function to get the data.
  for 'OrderListPage', I will call GetOrderInfo() etc...</p>
  
  <p>For each function, I will pass 'PageSize' and 'CurrentPage' so that I can effectively select required number of record(instead of selecting all records).</p>
  
  <p>So my question is, how can I create the control as a general control ? Because for each page, I have to call different functions. I can refer to list page's gridview by creating a public property in user control. But if I click, 'First', 'Previous','Next', or 'Last' links of the user control, I have to connect to database and select records. Can I pass the function name to the user control and execute the function, then bind the grid?</p>