I think what you’re looking for is ScriptTimeout
. You can set this in-page like this:
Page.Server.ScriptTimeout = 60;
The timeout value is in seconds.
Also, be aware of the fact that if you are running in debug mode, this gets ignored and the timeout is set to the maximum; I don’t think that’s an issue for you anyway though, as you’re increasing the timeout, not decreasing it.