【发布时间】:2018-03-28 20:53:17
【问题描述】:
@using System.Web.Helpers
@{
WebGrid grid = new WebGrid(Model, canPage: true, rowsPerPage: 5);
}
@grid.GetHtml(tableStyle: "WebGrid",
headerStyle: "header",
alternatingRowStyle: "alt",
selectedRowStyle: "select",
columns: grid.Columns(
grid.Column("UploadBy", "UploadBy"),
grid.Column("UploadPath", "UploadPath")
))
上面的代码在@grid.GetHtml 中出现错误
对“IHtmlString”类型的引用声称它在 System.Web 中定义,但未找到
我尝试添加引用 dll,但不被接受。应该怎么做?
【问题讨论】:
-
如果您打开详细的构建输出,您是否会收到任何有关无法解析的引用的构建警告?您可能需要在 Web.Config 中编辑您的程序集绑定
-
您是否尝试在顶部代码上添加
using System.Web.Helpers.WebGrid;?
标签: asp.net-core webgrid