Possible Duplicate:
How to terminate code that takes long in vb.net?
how to terminate function/code (not entire page) when it takes some time, for example, more than 1 sec?
If Code > 1 Sec Then Terminate the code....
I found the command "Server.ScriptTimeou", but it stops the entire page instead of one command.