我的"管理"区域注册没有什么问题,它存储在"管理"区域文件夹内的AdminAreaRegistration.cs中.我的路线看起来像这样:
context.MapRoute(
"Admin_News",
"Admin/News",
new { controller = "News", action = "Index" }
);
context.MapRoute(
"Admin_Pages",
"Admin/Pages",
new { controller = "Pages", action = "Index" }
);
context.MapRoute(
"Admin_Galleries",
"Admin/Galleries",
new { controller = "Galleries", action = "Index" }
);
context.MapRoute(
"Admin_Categories",
"Admin/Categories",
new { controller = "Categories", action = "Index" }
);
context.MapRoute(
"Admin_Products",
"Admin/Products",
new { controller = "Products", action = "Index" }
);
context.MapRoute(
"Admin_Files",
"Admin/Files",
new { controller = "Files", action = "Index" }
);
context.MapRoute( …Run Code Online (Sandbox Code Playgroud) 是否可以在DataTables.net中呈现自定义列?我已经阅读了很多教程和文档,但无法使其正常工作.我想用链接创建第三列,我使用第一列的信息.我的代码看起来像这样:
$(document).ready(function () {
$('#categories').DataTable({
"ajax": '@Url.Action("Table", "Categories")',
"columns": [
{ "data": "Name" },
{ "data": "Parent" },
null
],
"columnsDefs": [
{
"render": function(data){
return "<a href='~/Admin/Categories/Edit' + data.Name + '>EDIT</a>";
},
"targets": 0
}
]
});
});
Run Code Online (Sandbox Code Playgroud)
在json中,我只获取Name和Parent列信息.有什么想法在里面创建名字的第三列吗?谢谢!