use
this.ClientScript.RegisterClientScriptBlock
to put a javascript block.
Another way is to use make head as runat="server" and access this from codebehind while the page loads :
HtmlGenericControl thehead = this.FindControl("serverid") as HtmlGenericControl;
thehead.Controls.Add("your block");
Simple. :rose: :)