protected void rViewHeroes_ItemDataBound(object sender, RepeaterItemEventArgs evt) { if (evt.Item.ItemType == ListItemType.Item || evt.Item.ItemType == ListItemType.AlternatingItem) { try { DynamicNode hero = (DynamicNode)evt.Item.DataItem; ((HyperLink)evt.Item.FindControl("hplHero")).NavigateUrl = heroPageUrl + "?id=" + hero.Id; ((Image)evt.Item.FindControl("imgHeroDificulty")).ImageUrl = D3pUtilities.GetHeroDificulty(hero.GetPropertyValue(Hero.heroHardcore)); ((Label)evt.Item.FindControl("lblHeroName")).Text = hero.GetPropertyValue(Hero.heroName); ((Literal)evt.Item.FindControl("lblHeroLevel")).Text = hero.GetPropertyValue(Hero.heroLevel); ((Image)evt.Item.FindControl("imgHeroIcon")).ImageUrl = D3pUtilities.GetHeroIcon(hero.GetPropertyValue(Hero.heroClass)); } catch (Exception exc) { string b = exc.ToString(); Response.Write(exc.StackTrace); } } }
public static IHtmlString RichText(this RazorLibraryCore ctx, DynamicNode item, string alias) { return(new LazyHtmlString(() => umbraco.library.RenderMacroContent(item.GetPropertyValue(alias), ctx.Node.Id))); }