+2  A: 

For external script sources you can use this :

if (!ClientScript.IsClientScriptIncludeRegistered("externalResuorce"))
{
    ClientScript.RegisterClientScriptInclude("externalResuorce", 
    "scripts/myscripts.js");
}

But for stylesheet files, you can use this :

HtmlLink link = new HtmlLink();
link.Href = "main.css";
link.Attributes["type"] = "text/css";
link.Attributes["rel"] = "stylesheet";
Page.Header.Controls.Add(link);

and to control maybe you should loop Page.Header.Controls collection and look for a HtmlLink that has main.css href.

EDIT : Also this might help for finding your literal control in header's controls collection :

Page.Header.FindControl("your_literals_id");
Canavar
+1  A: 

Maybe loop through the Controls collection and test for ID property. If found, remember and break. Never done this in ASP.NET, but in WinForms and WPF.

Sascha