Dmitry,
The finally {} should only be used to clean house, so to speak. It should only be used to close resources, etc. that have been opened in the try. In your previous question, where you're opening database connections,etc ... closing that connection should be just about the only thing in the finally{}. All other code should be after the finally{}. As far as execution speed, I have no idea of that.
~~Bonnie
>Now that I understand more about variable scoping as it relates to Try {} Catch {} and Finally {} and revise my page to incorporate the error trapping code, I come across the following question.
>
>In my case, it seems that I have to put a great deal of code into the Finally {} block. Almost all of the business logic (since the business mostly consists of painting the page from a couple of data readers). Is this a good programming? Or should I look for ways to make Finally block small and put most code in the after Finally block?
>
>My concern is that I don't know if ASP.NET executes code in Finally just as fast as it would in any other part of the page?