Yeah that's a big problem you code wont run at all in release mode, it will cast an exception.
Try to think about it..
A user makes a request
your code runs
you display a message box
.. not nothing happens until someone
on the server takes action on the message box.
see this post[
^] to see how you can display a messagebox in the client side,
after the request has been processed and a response has been sent by the server