我在Asp.net mvc应用程序中使用数据表,并使用datatables在表单中显示用户列表。 我想使用带有图像文件的弹出窗口添加新记录。 如何使用数据表在弹出窗口中上传图片?
注意:
编辑:
$(function () {
$('#ItemsDatatable').dataTable({
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": '@Url.Content("~/Person/Get")',
"aoColumns": [
{ "sName": "ItemID", "bSearchable": false, "bSortable": false, "visible": false },
{ "sName": "CusID", "bSearchable": false, "bSortable": false, "visible": false },
{ "sName": "Name" },
{ "sName": "Description" },
{ "sName": "Image", "bSearchable": false, "bSortable": false },
{ "sName": "Price" }
]
}).makeEditable(
{
'sAddURL': '@Url.Content("~/Person/Add")',
'sDeleteURL': '@Url.Content("~/Person/Delete")',
'sUpdateURL': '@Url.Content("~/Person/Update")',
"aoColumns": [
{ "sName": "ID", "bSearchable": false, "bSortable": false, "visible": false },
{ "sName": "CusID", "bSearchable": false, "bSortable": false, "visible": false },
{
indicator: 'Saving...',
tooltip: 'Click to select customer',
loadtext: 'loading...',
type: 'select',
onblur: 'submit',
data: GetCustomers(),
},
{ "sName": "Description" },
{ "sName": "Image", "bSearchable": false, "bSortable": false },
{ "sName": "Price" }
]
});
});