internal static bool RegisterControl(Control control) { if (control is IJQueryControl) { StyleSheetContext context = GetOrCreateCurrentContext(control); context.Add((IJQueryControl)control); return(true); } return(false); }
private static StyleSheetContext GetOrCreateCurrentContext(Control control) { StyleSheetContext context = GetCurrentContext(control.Page); bool create = context == null; if (create) { context = new StyleSheetContext(); control.Page.Items.Add(typeof(StyleSheetContext), context); } return(context); }