Protected Overrides Sub Render(writer As System.Web.UI.HtmlTextWriter) Dim loStringBuilder As System.Text.StringBuilder = Nothing Dim loTextWriter As System.Web.UI.HtmlTextWriter = Nothing ' If this is Html5 If oProcess.lHtml5 Then loStringBuilder = New System.Text.StringBuilder("<!DOCTYPE HTML>" + oApp.cCR + oApp.cCR) Else loStringBuilder = New System.Text.StringBuilder("") End If loTextWriter = New System.Web.UI.HtmlTextWriter(New System.IO.StringWriter(loStringBuilder)) MyBase.Render(loTextWriter) writer.Write(loStringBuilder.ToString) End SubThis allows to add the DOCTYPE declaration when needed. I discovered this morning that I had to write something even if I do not need it otherwise there is no HTML rendered on the page. My question is if there is a way to simplify that knowing that I only need to add this DOCTYPE on the related condition.