Sounds almost like a search engine or document searching app that is querying a dictionary and matching document ID's. I've written one of those before although that's not entirely relevant, but what is is that all the hard work should be at the sql server, also it's potentially possible to do almost any query in one trip, not in a loop if you do some hard refactoring of the data and or add speciality tables just for this process. Those thousands of id's, that just sounds..well wrong. I would look first at the database and potentially refactoring it before I'd even consider anything else. You say you've been tasked with going to asp.net from classic asp, to be honest that's not related at all to the real problem, you need to find a solution that *doesn't* involve looping, separate queries with thousands of id's in the IN clause before you do anything else. And don't say you can't touch the data, there's always a way to simplify this stuff, sometimes building a separate table entirely from the existing data, who knows but what you are describing is just wrong. :)
"The pursuit of excellence is less profitable than the pursuit of bigness, but it can be more satisfying." - David Ogilvy