protected void repeater_ItemDataBound(object sender, RepeaterItemEventArgs e) { if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) { var category = e.Item.DataItem as EUIPolicyAreaModel; HyperLink navLink = e.Item.FindControl("categoryLink") as HyperLink; var areaName = category.Attributes.policyAreaName.Value; var categoryName = category.Attributes.uni_name; string navigateUrl = null; EUIssueTrackerHelper.ConstructPolicyAreaAndCategoryURL(areaName, categoryName, out navigateUrl); navLink.NavigateUrl = navigateUrl; } }
public IEnumerable <SiteMapNode> GetVirtualNodes(SiteMapProvider provider) { IList <SiteMapNode> sitemap = new List <SiteMapNode>(); if (dossierUpdate != null) { SiteMapNode policyAreaNode = new SiteMapNode(provider, "dossierUpdateKey", "javascript:void(0)", dossierUpdate.Attributes.policyAreaName.Value); sitemap.Add(policyAreaNode); string policyAreaAndCatUrl = "javascript:void(0)"; EUIssueTrackerHelper.ConstructPolicyAreaAndCategoryURL(dossierUpdate.Attributes.policyAreaName.Value, dossierUpdate.Attributes.policyCategoryName.Value, out policyAreaAndCatUrl); SiteMapNode policyCategoryNode = new SiteMapNode(provider, "dossierUpdateKey", policyAreaAndCatUrl, dossierUpdate.Attributes.policyCategoryName.Value); sitemap.Add(policyCategoryNode); var statusUrl = "javascript:void(0)"; EUIssueTrackerHelper.ConstructStatusUrl(dossierUpdate.Attributes.status.Value, out statusUrl); SiteMapNode dossierUpdateNode = new SiteMapNode(provider, "dossierUpdateKey", statusUrl, dossierUpdate.Attributes.status.Value, dossierUpdate.Attributes.shortTitle.Value); sitemap.Add(dossierUpdateNode); return(sitemap); } return(sitemap); }