【发布时间】:2013-12-04 13:32:16
【问题描述】:
我正在使用html2canvs.js 截取此处描述的页面的屏幕截图:
How to take screen shot of current webpage using javascript/jquery
上述过程工作正常,但现在我想通过 ajax 将 Base64 数据传递给 c# 方法。我的代码如下:
$('#gbox_Basic').html2canvas({
onrendered: function (canvas) {
var imgString = canvas.toDataURL("image/png");
$.ajax({
type: "POST",
url: "/Home/SentEmail2",
data: //how to pass base64 data 'imgString' ,
contentType: "multipart/form-data",
success: function () {
}
});
}
});
这是我的 c# 方法
public void SentEmail2(what type of param it would accept?) {
//process incoming params
}
【问题讨论】: