Example #1
0
        public static string Id(this UpdatePanelScope panel, bool recursive = true)
        {
            if (!recursive)
            {
                return(panel.Data().AddOrGetExisting("Id", () => panel.Settings.Id ?? ((panel.IndexInParent() + 1).ToString())));
            }

            var parents = panel.Parents().Reverse();

            return(string.Join("/", parents.Concat(new[] { panel }).Select(p => p.Id(false))));
        }
Example #2
0
 public static UpdatePanelScope Parent(this UpdatePanelScope panel)
 {
     return(panel.Parents().FirstOrDefault());
 }