I have the need in a web application to print gridview data that is displaying on the screen. Currently I am adding the gridview as part of a HTML form to open a new page and add other text to the page. For example, I add the current date, grid name, and query parameters so they can see these on the printed page.
This all seems to work when the dataset is small. However when the dataset grows to about 2000 records, the page occasionally times out before loading. Is there a better way to export data to be printed so it doesn't time out?
I am getting the error "Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size has been reached." Unless building the gridview is taking all pooled connections, which I have at 300, it should not be using all of the connections. This is an internal website that currently is very low in use, no more than 2 or 3 concurrent users as we are not completely in production. It has happened in development when I know that I was the only user. I think that the page may be timing out.
Any help will be greatly appreciated.