Added tooltip to to surrounding div and refactored to use Render methods of HtmlWriter.

This also fixes a bug where the error message was written as unencoded HTML