volume_up

A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More

volume_up

A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More

CustomFileSummary, get categories

I've defined own custom values in the FileSummary.config file and now i want to be able to filter on these values (e.g. categories) by binding these values to a dropdown list, the only way i've found is to load the file itself and try to retrieve the values "manually", isn't there an easier way?
#25881
Nov 11, 2008 10:07

Atm i got like this (which works but is far from perfect):

XDocument document = XDocument.Load(Server.MapPath(root.CustomFileSummaryVirtualPath));
var languages = from d in document.Descendants()
where d.Parent != null && d.Parent.Attribute("ref") != null && d.Parent.Attribute("ref").Value == "Language"
select new { Text = Toolbox.Translate("/pagespecific/t8/filters/languages/" + ((XElement)d.FirstNode).Value.ToLower()),
Value = ((XElement)d.LastNode).Value };

LanguageDropDownList.DataSource = languages;
LanguageDropDownList.DataTextField = "Text";
LanguageDropDownList.DataValueField = "Value";
LanguageDropDownList.DataBind();

 

#25885
Nov 11, 2008 11:37
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.