Definitely in the DB for preference, if at all possible.
Sometimes you can mix things up a bit, for example, if you have results returned from a database function (and not in a stored procedure, functions can be part of larger queries in ways that cannot be stored in procedures), then you may have another function order and paginate or possibly Linq2SQL or a similar call to the result page from the specified function, creating the correct SQL if necessary.
If you can at least get an order in the database and, as a rule, want only the first few pages (which often happens in real use), then you can at least have reasonable performance for these cases, since there are enough rows to skip and then take the required lines, you need to load from db. Of course, you should still verify that performance is reasonable on those rare occasions when someone is really looking for page 1.2312!
However, there is only a compromise for cases where paging is very difficult, as a rule, is always a page in the database, if for some reason it is either extremely difficult or the total number of rows is guaranteed to be low.
source share