有谁知道如何在 NHAML 中使用指令(例如 @Import)?
问问题
151 次
1 回答
1
如果您的意思是添加引用和导入命名空间,您可以在 app.config 或 web.config 中进行
<?xml version="1.0"?>
<configuration>
<configSections>
<section name="nhaml" type="NHaml.Configuration.NHamlConfigurationSection, NHaml"/>
</configSections>
<nhaml autoRecompile="true">
<assemblies>
<add assembly="NHaml.Samples.Mvc"/>
</assemblies>
<namespaces>
<add namespace="NHaml.Web.Mvc"/>
<add namespace="NHaml.Samples.Mvc.Controllers"/>
</namespaces>
</nhaml>
...
</configuration>
于 2009-04-28T08:35:47.607 回答