views:

42

answers:

2

The title pretty much says it. I've written a web control (a header) that is going into our common library, but it references a javascript file and a css file. It works fine the first time, but when I refresh the page it looses that reference because the control didn't get rendered again so it didn't put the references out there. Is there any way to get around this or do I have to include the js and css file in the page rather than keeping it contained withing the assembly with controls?

A: 

If the HTML output by the cached control contains the css or js (or image for that matter) then it should be there on a refresh when that cached HTML is output

NickAtuShip
That would hinder performance and make the page take longer to download.
Max Schmeling
A: 

This is not possible without using inline styles and scripts.

Max Schmeling