有没有人知道如何使用NHAML指令(例如@ Import)?
答案 0 :(得分: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>