Copy codeThe Code is as follows: <% @ 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 = @ "<site navigation list of visiting employees =''>
<Site navigation site name = 'Design scheduler 'site no. = 'pem' site link =' ../NWEPDI. pem. WEB/../Project/ProjectList. aspx? QueueType = EPM0101 '/>
<Site navigation site name = 'Design job' site no. = 'ddm' site link = '../MoEngineer/ProjectMgr. aspx'/>
<Site navigation site name = 'Design process' site number = 'dfm 'site link =' ../MoFlow/CWorkItemList. aspx? QueueType = DFM0101 '/>
<Site navigation site name = 'print management' site no. = 'ppm 'site link =' ../MoPrint/PrintMgr. aspx? QueueType = PPM0101 '/>
<Site navigation site name = 'working hours management' site no. = 'whm' site link = '../MoWorkHour/HourMgrPrj. aspx? QueueType = WHM0103 '/>
<Site navigation site name = 'electronic archive 'site no. = 'arc' site link =' ../MoArchieve/ProjectMgr. aspx? QueueType = ARC0101 '/>
<Site navigation site name = 'statistical report' site no. = 'ssm' site link = '../MoReports/ReportView. aspx? QueueType = SSM0101 '/>
<Site navigation site name = 'data management' site no. = 'dam 'site link =' ../MoDocument/ProjectFileMgr. aspx? QueueType = DAM0101 '/>
<Site navigation site name = 'System management' site no. = 'dsm 'site link =' ../MoAdmin/CommonRuleList. aspx? QueueType = DSM0101 '/>
</Site navigation list> ";
}
}
}
<? 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 = "// site navigation list">
<Div>
<Ul>
<Li> navigation </li>
<Xsl: for-each select = "site navigation">
<Li>
<Xsl: value-of select = "@ site name"/>
<Xsl: attribute name = "id">
<Xsl: value-of select = "@ site no."/>
</Xsl: attribute>
<Xsl: attribute name = "href">
<Xsl: value-of select = "@ site Link"/>
</Xsl: attribute>
</Li>
</Xsl: for-each>
</Ul>
</Div>
</Xsl: template>
</Xsl: stylesheet>