Does it have to be a message box? I've found that trying to work with MessageBoxes are a pain in ASP.NET. I just use hidden buttons and when there's an exception, I show the buttons.