One trick i use is to simulate a dialog box using a panel and server side controls. I do this in a user control and add it to any page I will need to use it. I always make sure that the page contents are in a table, panel or div that I can set it's visible property to false then I set the visible property of my user control dialog box to true. The OK and Cancel buttons of my dialog box reverses the visible properties.
I actually created several user controls to simulate some standard dialog boxes but you could use one with appropriate properties to set it's behaviour at runtime.
Some of the properties you'd like want are to specify the icon, the buttons (yes/no, OK/Concel, OK only, etc.) and also allow a text input field like the inputbox does.