主頁(yè) > 知識(shí)庫(kù) > .net中使用xsl文件作為導(dǎo)航菜單的小例子

.net中使用xsl文件作為導(dǎo)航菜單的小例子

熱門(mén)標(biāo)簽:泰州手機(jī)外呼系統(tǒng)軟件 山東防封電銷(xiāo)卡辦理套餐 內(nèi)蒙古智能電銷(xiāo)機(jī)器人哪家強(qiáng) 百度地圖標(biāo)注點(diǎn)擊事件 怎樣在地圖標(biāo)注消火栓圖形 杭州智能電話(huà)機(jī)器人 濟(jì)源人工智能電話(huà)機(jī)器人價(jià)格 廈門(mén)四川外呼系統(tǒng) 地圖標(biāo)注位置多的錢(qián)

復(fù)制代碼 代碼如下:

%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="testweb.WebForm1" %>

!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

html xmlns="http://www.w3.org/1999/xhtml">
head runat="server">
    title>/title>
/head>
body>
    form id="form1" runat="server">
    div>
     asp:Xml TransformSource="XSLTFile1.xslt" ID="minanva" runat="server">/asp:Xml>
    /div>
    /form>
/body>
/html>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace testweb
{
    public partial class WebForm1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            minanva.DocumentContent = @"站點(diǎn)導(dǎo)航列表 來(lái)訪員工=''>
                                          站點(diǎn)導(dǎo)航 站點(diǎn)名稱(chēng)='設(shè)計(jì)計(jì)劃' 站點(diǎn)編號(hào)='EPM' 站點(diǎn)鏈接='../NWEPDI.EPM.WEB/../Project/ProjectList.aspx?QueueType=EPM0101' />
                                          站點(diǎn)導(dǎo)航 站點(diǎn)名稱(chēng)='設(shè)計(jì)作業(yè)' 站點(diǎn)編號(hào)='DDM' 站點(diǎn)鏈接='../MoEngineer/ProjectMgr.aspx' />
                                          站點(diǎn)導(dǎo)航 站點(diǎn)名稱(chēng)='設(shè)計(jì)流程' 站點(diǎn)編號(hào)='DFM' 站點(diǎn)鏈接='../MoFlow/CWorkItemList.aspx?QueueType=DFM0101' />
                                          站點(diǎn)導(dǎo)航 站點(diǎn)名稱(chēng)='印務(wù)管理' 站點(diǎn)編號(hào)='PPM' 站點(diǎn)鏈接='../MoPrint/PrintMgr.aspx?QueueType=PPM0101' />
                                          站點(diǎn)導(dǎo)航 站點(diǎn)名稱(chēng)='工時(shí)管理' 站點(diǎn)編號(hào)='WHM' 站點(diǎn)鏈接='../MoWorkHour/HourMgrPrj.aspx?QueueType=WHM0103' />
                                          站點(diǎn)導(dǎo)航 站點(diǎn)名稱(chēng)='電子歸檔' 站點(diǎn)編號(hào)='ARC' 站點(diǎn)鏈接='../MoArchieve/ProjectMgr.aspx?QueueType=ARC0101' />
                                          站點(diǎn)導(dǎo)航 站點(diǎn)名稱(chēng)='統(tǒng)計(jì)報(bào)表' 站點(diǎn)編號(hào)='SSM' 站點(diǎn)鏈接='../MoReports/ReportView.aspx?QueueType=SSM0101' />
                                          站點(diǎn)導(dǎo)航 站點(diǎn)名稱(chēng)='資料管理' 站點(diǎn)編號(hào)='DAM' 站點(diǎn)鏈接='../MoDocument/ProjectFileMgr.aspx?QueueType=DAM0101' />
                                          站點(diǎn)導(dǎo)航 站點(diǎn)名稱(chēng)='系統(tǒng)管理' 站點(diǎn)編號(hào)='DSM' 站點(diǎn)鏈接='../MoAdmin/CommonRuleList.aspx?QueueType=DSM0101' />
                                        /站點(diǎn)導(dǎo)航列表>";
        }
    }
}


?xml version="1.0" encoding="utf-8"?>
xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"
>
  xsl:output method="xml" indent="yes"/>
  xsl:template match="http://站點(diǎn)導(dǎo)航列表">
    div>
      ul>
        li>導(dǎo)航/li>
        xsl:for-each select="站點(diǎn)導(dǎo)航">
          li>
            xsl:value-of select="@站點(diǎn)名稱(chēng)"/>
            xsl:attribute name="id">
              xsl:value-of select="@站點(diǎn)編號(hào)"/>
            /xsl:attribute>
            xsl:attribute name="href">
              xsl:value-of select="@站點(diǎn)鏈接"/>
            /xsl:attribute>
          /li>
        /xsl:for-each>
      /ul>
    /div>
  /xsl:template>
/xsl:stylesheet>

標(biāo)簽:周口 新鄉(xiāng) 臺(tái)州 朔州 喀什 百色 朝陽(yáng) 洛陽(yáng)

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《.net中使用xsl文件作為導(dǎo)航菜單的小例子》,本文關(guān)鍵詞  .net,中,使用,xsl,文件,作為,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問(wèn)題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無(wú)關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《.net中使用xsl文件作為導(dǎo)航菜單的小例子》相關(guān)的同類(lèi)信息!
  • 本頁(yè)收集關(guān)于.net中使用xsl文件作為導(dǎo)航菜單的小例子的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章