Add this to the head:
<link id="LinkCss" runat="server" type="text/css" rel="stylesheet"/>
Add this this
C# code to your class:
protected System.Web.UI.HtmlControls.HtmlGenericControl LinkCss;
and use this code to change the attribute href
LinkCss.Attributes["href"] = "include/main.css";
the .Net way to add script blocks to the page is by use of RegisterClientScriptBlock(string key, string script).
it will add the script just after the viewstate in the HTML