The code in the global.asax.cs that adds the media="print" attribute to the <link /> tags that reference stylesheets ending in "print.css" that ASP.NET adds via theming starts to add the attribute to all <link /> tags after a few postbacks. This appears to be a bug in ASP.NET causing this. To fix you need to explicitly remove the media attribute in an else clause:
var printLinks = page.Header.Controls
.OfType<HtmlLink>()
.Where(l => l.Href.EndsWith("print.css", StringComparison.InvariantCultureIgnoreCase));
foreach (var link in page.Header.Controls.OfType<HtmlLink>())
{
if (printLinks.Contains(link))
{
link.Attributes["media"] = "print";
}
else
{
link.Attributes.Remove("media");
}
}
No files are attached