摘要: using System;using System.Web;using System.IO;using NVelocity;using NVelocity.App;using NVelocity.Context;using NVelocity.Runtime;using Commons.Collections;namespace B{ public class NVelocityHelper { private VelocityEngine velocity = null; private IContext context = null; ... 阅读全文
posted @ 2013-07-24 12:40 一只小鸟 阅读(402) 评论(0) 推荐(0)
摘要: 转载别人作品~~~~~NVelocity 使用文件型模板例子 例子下载usingNVelocity;usingNVelocity.App;usingNVelocity.Runtime;VelocityEnginevltEngine=newVelocityEngine();vltEngine.SetProperty(RuntimeConstants.RESOURCE_LOADER,"file");vltEngine.SetProperty(RuntimeConstants.FILE_RESOURCE_LOADER_PATH,Server.MapPath("~/Tem 阅读全文
posted @ 2013-07-24 12:03 一只小鸟 阅读(173) 评论(0) 推荐(0)
摘要: NVelocity是一个基于.NET的模板引擎(template engine)。它允许任何人仅仅简单的使用模板语言(template language)来引用由.NET代码定义的对象。从而使得界面设计人员与.NET程序开发人员基本分离。一、nVelocity的常用功能简介1、 在页面中定义变量,并进行简单的运算。2、 在页面中获得对后台程序实体对象的引用。3、 在页面中迭代实体对象集合。4、 在页面中获得实体对象的属性,及其方法。5、 对逻辑判断语句的支持。6、 对外部文件的引用。7、 对外部文件的解析。二、nVelocity的工作原理可以使用.NET的反射实现。以下是nVelocity对迭 阅读全文
posted @ 2013-07-24 11:58 一只小鸟 阅读(202) 评论(0) 推荐(0)