Some of my user controls have a dedicated stylesheet file to style that particular user control. So what I've been doing (before AJAX) was adding the stylesheet from the user control's code-behind like this:
protected void Page_Load(object sender, EventArgs e)
{
Page.Header.Controls.Add("/store/catalog1.css");
}
This has been working out nice because no matter what page or other user control loads the user control, it grabs the CSS file as well. But when I'm dynamically loading the user control thru a RadToolTipManager for example, this obviously doesn't work and the dynamically loaded user control remains unstyled. Is there a way to dynamically load the stylesheet as well? I was wondering what Telerik does, do they bite the bullet and load ALL stylesheets when the website first loads, or do they dynamically load stylesheets on a per-needed basis to keep sizes down?
protected void Page_Load(object sender, EventArgs e)
{
Page.Header.Controls.Add("/store/catalog1.css");
}
This has been working out nice because no matter what page or other user control loads the user control, it grabs the CSS file as well. But when I'm dynamically loading the user control thru a RadToolTipManager for example, this obviously doesn't work and the dynamically loaded user control remains unstyled. Is there a way to dynamically load the stylesheet as well? I was wondering what Telerik does, do they bite the bullet and load ALL stylesheets when the website first loads, or do they dynamically load stylesheets on a per-needed basis to keep sizes down?