navigator.cs

来自「企业内部管理系统」· CS 代码 · 共 59 行

CS
59
字号
using System;
using System.Web;
using System.Web.UI.HtmlControls;
using System.Web.UI;
using System.Xml;
using System.Xml.XPath;
using System.Xml.Xsl;

namespace infoWeb.ThePhile.Web.Controls.Server
{
	/// <summary>
	/// Summary description for Class1.
	/// </summary>
	public class Navigator: System.Web.UI.Control
	{
		string transformFilePath;
		string sourceFilePath;


		public string TransformFile
		{
			get 
			{
				return transformFilePath;
			}
			set 
			{
				transformFilePath = value;
			}
		}

		public string SourceFile
		{
			get 
			{
				return sourceFilePath;
			}
			set 
			{
				sourceFilePath = value;
			}
		}

		protected override void OnInit( EventArgs e )
		{		
			base.OnInit( e );
		
		} 

		protected override void Render( HtmlTextWriter writer )
		{			
			XPathDocument xdoc = new XPathDocument( Context.Server.MapPath( sourceFilePath ) );
			XslTransform xslt = new XslTransform();
			xslt.Load( Context.Server.MapPath( transformFilePath ) );
			xslt.Transform( xdoc, null, writer );	
		}
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?