private static string ProcessStyleSheet(string styleSheetContent, string[] keyNames, string resourceNameFormat) { if ((!string.IsNullOrEmpty(styleSheetContent)) && (keyNames != null)) { StringBuilder sb = new StringBuilder(styleSheetContent); foreach (string keyName in keyNames) { sb.Replace("$" + keyName + "$", ResourceProvider.GetResourceUrl(string.Format(CultureInfo.InvariantCulture, resourceNameFormat, keyName), true)); } return(sb.ToString()); } return(styleSheetContent); }
internal static void RegisterScriptResource(Control ctl, string key, string resourceName) { ScriptManager.RegisterStartupScript(ctl, ctl.GetType(), key, GetJavaScript(ResourceProvider.GetResourceUrl(resourceName, true)), false); }