在我的 Controller 中,我显然使用了#include 命名空间,因此在创建对象时我不必写出整个内容。在 aspx/ascx View 文件中执行此操作的方法是什么?目前我不得不写出这些整个命名空间,而且它变得非常蹩脚。
最佳答案
您需要使用 Import
directive .
<%@ Import Namespace="Someplace.Models" %>
关于c# - 与#include Someplace.Models 等效的 aspx/ascx View 页面是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3876069/