Dim loHtmlGenericControl As System.Web.UI.HtmlControls.HtmlGenericControl = Nothing ' If we have a Head tag If Not oProcess.oPage.Header Is Nothing Then oProcess.oHtmlHead = oProcess.oPage.Header Else ' Find the Html control loHtmlGenericControl = oProcess.oPage.FindControl("LXHtml") ' If we have a Html tag If Not loHtmlGenericControl Is Nothing Then loHtmlGenericControl.Controls.AddAt(0, oProcess.oHtmlHead) End If End If