Control Output Caching and RegisterClientScriptInclude

Always remember that if you are using Control output caching, RegisterClientScriptInclude will NOT run if the used control is returning a cached version.

This also goes for any controls (user or custom) nested within your ascx.

The workaround?  You need to add the <script> tage manually in the markup, or, if you want to have the <script> in the header, put it into your aspx or master page.

Just a heads up - joel

No Comments