Here is a the store procedure implementation from "Custom Data Paging in ASP_NET - ASP_NET" article which located on CodeProject Similar code were added to one of the articles I 've just read in MSDN May Magazine. We can use it with a DataGrid custom...
By using extensions u could use your internal C# class services in your xslt transformation script. You can also attach parameters values before the transformation began I find a nice example for that on ftpsite article Here is a code snippet from it...