Пример #1
0
        protected void dlRecentProduct_Bound(object sender, DataListItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                lwg_Catalog obj        = (lwg_Catalog)e.Item.DataItem;
                string      catalogURL = SEOHelper.GetCatalogUrl(obj);

                Label lbl = (Label)e.Item.FindControl("lblNumber");
                lbl.Text = (e.Item.ItemIndex + 1).ToString();

                HyperLink hpl = (HyperLink)e.Item.FindControl("hplName");
                hpl.Text        = obj.TitleDisplay;
                hpl.NavigateUrl = catalogURL;
            }
        }