我正在使用jqgrid和asp.net 4.0 Web表单应用程序,我只想将图像上传到sqlserver数据库。请举例说明正确的方法。提前谢谢。
colModel: [
{ name: 'imageToUpload', index: 'ImageID', align: 'left', editable: true, edittype: 'file', editoptions: { enctype: "multipart/form-data" }, search: false },
}
],
beforeSubmit: function (postdata, formid) {
var complete = false;
var message = "";
var namefile = "";
alert("hi");
$.ajaxFileUpload({
url: '<%=Page.ResolveUrl("~/Master/PolicyMaster.ashx") %>',
secureuri: false,
fileElementId: 'imageToUpload',
dataType: 'json',
success: function (data, status) {
}
});
return [true, message];
},