However (and this is the part that caught me out), the above won't work if you're using an UpdatePanel in your Application Page, for a number of different reasons. So if you've got a modal dialog opening an application page in SP2010 which uses an UpdatePanel and you'd like to close it from codebehind, you can't use the Response object - instead, you'll have to use the ScriptManager and the RegisterClientScriptBlock method.
ScriptManager.RegisterClientScriptBlock( theButton, // control or UpdatePanel that will be rendered typeof(YourPage), "UniqueKey", // makes your script uniquely identifiable "window.frameElement.commitPopup();", true);
Not too hard, right? But man did I spend way too long on this... Thanks to Ruben who provided the answer on StackOverflow. Happy coding everyone!