I do not believe that html is permissible to put any tags between the head and body tags.
However, if you really want to do this for some reason, you can do this:
<html> <head> </head> <%= StringToInsert %> <body> </body> </html>
Then in the code behind, when the page loads, you can give it a value.
public string StringToInsert; protected void Page_Load(object sender, EventArgs e) { StringToInsert = "<I'm almost certainly invalid HTML!> <I'm almost certainly invalid HTML!>"; }
source share