最新评论

咸鱼翻身 2009-03-16 21:09
用了网络上其他控制单一实例程序启动
发现或多或少有些问题
这个不错
决定用这个了
谢谢
风使者 2008-11-02 20:01
提示出错

“/”应用程序中的服务器错误。
--------------------------------------------------------------------------------

Unable to find resource 'H:\index.htm'
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: NVelocity.Exception.ResourceNotFoundException: Unable to find resource 'H:\index.htm'

源错误:


行 37:
行 38: //从文件中读取模板
行 39: Template temp = velocity.GetTemplate("H:\\index.htm");
行 40:
行 41: IContext context = new VelocityContext();



源代码

VelocityEngine velocity = new VelocityEngine();

ExtendedProperties props = new ExtendedProperties();
props.SetProperty(RuntimeConstants.FILE_RESOURCE_LOADER_PATH, "H:\\");

velocity.Init(props);

//从文件中读取模板
Template temp = velocity.GetTemplate("H:\\index.htm");

IContext context = new VelocityContext();
context.Put("from", Path.GetDirectoryName(Request.PhysicalPath) + "/tmp/");

//合并模板
StringWriter writer = new StringWriter();
//velocity.MergeTemplate(context, writer);
temp.Merge(context, writer);
Console.WriteLine(writer.GetStringBuilder().ToString());
zhlh101 2008-10-20 21:05
怎么引用cellpainting事件?即怎么让这个事件发挥作用?
请帮忙,谢谢
bgyl2002 2007-10-30 12:35
为什么提示不包含 RuntimeConstants.RESOURCE_LOADER 等的定义
canserly 2007-08-30 20:37
合并后的CELL的值可以在界面上修改合并后的CELL的值可以在界面上修改吗?吗?
JonyJaJa 2007-05-14 10:59
您好,我请问:我是在C#中,直接导入EXCEL文件到DATAGRIDVIEW中,但是当前面的数据是:123456,后面有这样:A123456,时,导入就回出错,在DATAGRIDVIEW中显示的是空值。如果把前面的数据中加入字母,这样的情况下就不会出现问题。请解答下。
shoucao 2007-02-08 13:45
偶有注册机,QQ 25660225 可以加我QQ 发给你,请注册CodeSmith字样或加到群 13827630
花纯春[匿名] 2006-12-23 15:28
还不能作到力如心想
.net是方便了,但的确有所得,就有所失
yumanqing 2006-12-22 10:24
if (e.RowIndex!=-1 && dgConfirm.Rows[e.RowIndex].Cells[1].Value.ToString()==" " )
我怎么提示这句话错误呢?缺少对象引用.

dgConfirm是一个datagridview,在VS2005下撒?怎么回事呢?
xiangdn1 2006-09-11 15:33
真TMD牛逼啊
老兄要是把纵向的也做出来真就造福大家了
使用Live Messenger联系我
关闭