部署到Azure(IIS)时,ASP.NET MVC UIHint无法正常工作

时间:2017-03-01 03:20:25

标签: c# asp.net-mvc data-annotations

部署到Azure(IIS)时,ASP.NET MVC UIHint无法正常工作。

我的模特

public class AssetModel
{   
    [UIHint("App/UserForms")]
    public int? FormId { get; set; }
}

EditorTemplates文件夹结构

EditorTemplates
-- App
---- UserForms.cshtml ( a dropdownlist)
-- Int32.cshtml (a numeric textbox)

使用AssetModel进行视图

@Html.EditorForModel()

结果(我在两种情况下都仔细检查了相同的已发布代码)

  • IIS Express(VS2015 debug + release):FormId显示为DropDownList =>行
  • 部署到本地IIS和Azure:FormId显示为numberic textbox =>不行。

有谁知道为什么以及如何解决这个问题?感谢

0 个答案:

没有答案