我正在使用这个不错的MVC5 Grid。但是,即使第一个简单示例对我也不起作用。即使我尝试将其分解以查找错误。
我的视图如下所示(如示例中所示):
@model IEnumerable<TestModel>
@(Html
.Grid(Model)
.Build(columns =>
{
columns.Add(model => model.TestProperty).Titled("TestHeader");
})
.Empty("Nothing found")
.Filterable()
.Sortable()
.Pageable()
)
我收到的错误是:
System.Web.HttpParseException:遇到结束标记“”,没有匹配的开始标记。您的开始/结束标签是否正确平衡?
at System.Web.WebPages.Razor.RazorBuildProvider.EnsureGeneratedCode()
at System.Web.WebPages.Razor.RazorBuildProvider.get_CodeCompilerType()
at System.Web.Mvc.BuildManagerWrapper.System.Web.Mvc.IBuildManager.GetCompiledType(String virtualPath)
at System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer)
at System.Web.Mvc.HtmlHelper.RenderPartialInternal(String partialViewName, ViewDataDictionary viewData, Object model, TextWriter writer, ViewEngineCollection viewEngineCollection)
at System.Web.Mvc.Html.PartialExtensions.Partial(HtmlHelper htmlHelper, String partialViewName, Object model, ViewDataDictionary viewData)
at NonFactors.Mvc.Grid.HtmlGrid`1.ToHtmlString()
at System.Web.WebPages.WebPageBase.Write(Object value)
at ASP._Page_Views_TestController_Index_cshtml.Execute() in c:\Development\Solution\Project\Views\TestController\Index.cshtml:line 3
似乎没有人遇到我的异常...关于此""
不存在的元素,我如何解决此错误的任何想法?