zoukankan      html  css  js  c++  java
  • UCSiteMapPath.ascx.cs

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    
    public partial class UserControls_UCSiteMapPath : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
    
        }
        protected void SiteMapPath1_ItemDataBound(object sender, SiteMapNodeItemEventArgs e)
        {
            var item = e.Item;
            if (item.ItemType == SiteMapNodeItemType.Current && item.SiteMapNode.Description == "查看商品详细")
            {
                var category = Category.GetProductCategory(new Guid(Request["ID"]));//商品的直接类别
    
                e.Item.Controls.AddAt(0, new HyperLink() { Text = category.Name, NavigateUrl = string.Format("~/ProductsByCategory.aspx?CategoryID={0}", category.ID) });
                e.Item.Controls.AddAt(0, new Literal() { Text = this.SiteMapPath1.PathSeparator });
                Category.BuildSiteMapPath(e, category, this.SiteMapPath1.PathSeparator);
    
                string titlename, name;
                if (this.Page is PageBase)
                {
                    titlename = (this.Page as PageBase).PageTitle;
                    name = titlename.Substring(6, titlename.Length-6);
                    e.Item.Controls.AddAt(0, new HyperLink() { Text = name, NavigateUrl = "~/" });
                    e.Item.Controls.AddAt(0, new Literal() { Text = this.SiteMapPath1.PathSeparator });
                }
            }
    
            string s = item.ToString();
        }
    
        
    }
    
  • 相关阅读:
    mongoDb
    profile ,explain,
    header 里面的contenttype
    group by,distinct的使用(30万数据测试)
    ubuntu 12.04 mysql 错误 Errcode 13
    php curl,爬虫
    explain mysql
    php 文件的函数
    create User,grand,Load data file
    android 按钮点击测试
  • 原文地址:https://www.cnblogs.com/seapub/p/2384398.html
Copyright © 2011-2022 走看看