Since you aren't supplying the parameter to indicate whether the current page should continue executing, it will automatically terminate the page by calling End(). Using the method with a single parameter is the same as calling the method with two parameters, with the second (endResponse) set to true
. Since End() results in an exception being thrown, it won't ever reach your throw statement.
Reference: http://msdn.microsoft.com/en-us/library/a8wa7sdt.aspx
When you use this method in a page
handler to terminate a request for one
page and start a new request for
another page, set endResponse to true
or call the Redirect method overload.
This method calls End for the original
request, which throws a
ThreadAbortException exception upon
completion.
If you want the page to continue executing you need to use the signature with two parameters and set the endResponse parameter to false
.