如何在MVC Webgrid中保存图像?以及如何在WebGrid中生成Image Column ......?
<div id="grid" class="Radius">
@grid.GetHtml(
tableStyle: "listing-border",
headerStyle: "gridhead",
footerStyle: "paging",
rowStyle: "td-dark",
alternatingRowStyle: "td-light",
mode: WebGridPagerModes.All,
firstText: "<<",
lastText: ">>",
previousText: "<",
nextText: ">",
columns: grid.Columns(
grid.Column(format: (item) => Html.CheckBox("check", false)),
grid.Column("ID"),
grid.Column("FirstName"),
grid.Column("LastName"),
grid.Column("EmailAddress"),
grid.Column("UserPicture"),
grid.Column("IsActive"),
grid.Column(header: "Edit", format: @<text><a href="@Url.Action("CreateUser", "User", new { ID = item.ID })" ><img src="~/Images/Edit.png" alt="" style="border:none;" /></a></text>, style: "colOperation"),
grid.Column(header: "Delete", format: @<text><a href="@Url.Action("", "", new { ID = item.ID })" ><img src="~/Images/Delete.png" alt="" style="border:none;" /></a></text>, style: "colOperation")
)
)
</div>
答案 0 :(得分:0)
尝试在webGrid中创建Image列:
grid.Column(header,format: @<div><img src="@Url.Content("~/Content/images/icon_edit.png")" alt="@Resources.Tooltip_Update"/></div>))
在webgrid中保存图片是什么意思?