/// <summary> /// Called by the framework when the component needs to be rendered as HTML. /// </summary> /// <param name="model">The model being rendered by the component.</param> /// <returns>The component rendered as HTML.</returns> public Task <string> RenderAsync(string model) { ModuleSkinList modSkins = GetSiblingProperty <ModuleSkinList>($"{PropertyName}_ModuleSkinList"); string name = (from l in modSkins where l.Name == model select l.Name).FirstOrDefault(); if (name == null) { name = modSkins.First().Name; } return(Task.FromResult(HE(name))); }
/// <summary> /// Called by the framework when the component needs to be rendered as HTML. /// </summary> /// <param name="model">The model being rendered by the component.</param> /// <returns>The component rendered as HTML.</returns> public async Task <string> RenderAsync(string model) { ModuleSkinList modSkins = GetSiblingProperty <ModuleSkinList>($"{PropertyName}_ModuleSkinList"); List <SelectionItem <string> > list = (from l in modSkins select new SelectionItem <string>() { Text = l.Name, Tooltip = l.Description, Value = l.CssClass, }).ToList(); return(await DropDownListComponent.RenderDropDownListAsync(this, model, list, null)); }