虽然,我可以检查剃刀视图中的web.config设置;即如果<add key="UnobtrusiveJSEnabled==false" value="true" />
设置为true或false或null,但如何在剃刀视图中发出自定义帮助器和脚本管理器?
如果@HTML.MyCustom.DDL()
UnobtrusiveJSEnabled==false
@if (System.Web.Configuration.ConfigurationManager.AppSettings["UnobtrusiveJSEnable"] == "false")
{
// how to include the custom helper here?
@HTML.MyCustom.DDL(); // does not render to the view??
@HTML.MyCustom.ScriptManager(); // does not render to the view??
}