在ASP.Net 4.0中为图像生成多个网格视图 [英] Generating Multiple Grid Views to Images in ASP.Net 4.0

查看:54
本文介绍了在ASP.Net 4.0中为图像生成多个网格视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨devlopers,



我使用dotnet 4.0与c#,asp.net和html2canvas



在我的Web应用程序中,我需要将多个网格导出到ppt。



在下面的jsfiddle中,我有87个带有数据的网格视图(表格)。



http://jsfiddle.net/LCVSk/19/ [< a href =http://jsfiddle.net/LCVSk/19/target =_ blanktitle =New Window> ^ ]



当我点击保存点击按钮时,需要打开新窗口,并在脚本中提到图像提到的网格(表格)。但它没有发生。它是打开窗口,网址是9412个字符。

如果我有87个网格(表格)图像没有生成,我不知道可能是什么原因。


请帮我解决这个问题。



如果我从87网格视图中删除一个网格视图(表格) (表格),表示删除

Hi devlopers,

I am using dotnet 4.0 with c#,asp.net and html2canvas

In my Web application i need to export multiple grids to the ppt.

In this below jsfiddle i am having 87 grid views(tables) with data.

http://jsfiddle.net/LCVSk/19/[^]

when i click the save click button will need open the new window with the image mentioned grid(table) in the script. But it is not happening. it is opening the window with url is having 9412 characters.
If i have 87 grids(tables) image is not generating, i don't know what might be the reason.

Kindly help me out this issue.

In case, if i remove one grid views(tables) from the 87 grid views(tables), it means remove the

<div id="slide87">......</div>

现在总网格(表格)数为86.在这种情况下,表格图像在新窗口中打开。



请查看以下带有数据的网格viwes(表格)的jsfiddle ..



http://jsfiddle.net/kishoredoni/V7Btk/ [ ^ ]



请分享你的答案它可能是缓存内存问题或我有大量数据或其他任何东西。



我在html2canvas中没有收到任何错误也。

Now the total grids(table) count is 86. in this case the table image is opening in the new window.

Please check the below jsfiddle having 86 grid viwes(tables) with data..

http://jsfiddle.net/kishoredoni/V7Btk/[^]

Please share your answers it might be cache memory problem or I am having huge data or anything else.

I am not getting any errors in html2canvas also.

推荐答案

你好,



我已经分了你的样本其他 [ ^ ]。看了你的代码,我意识到你只是创建第一个表的图像表示。您使用的window.open语法也不是正确的语法。另请记住,您无法通过URL传递非常大的数据。这是修改过的javascript。

Hello,

I have forked your sample here[^]. After looking at your code what I realized that you were creating image representation of first table only. Also the window.open syntax you were using is not the correct syntax. Also remember that you can not pass very large data over URL. Here is the modified javascript.


< span class =code-string>#btnSave)。click(
function (){
var hWin,img;
html = ;
hWin = window .open( );
for (i = 1 ; i< = 10 ; i ++){
html2canvas(
("#btnSave").click( function () { var hWin,img; html = ""; hWin = window.open("", ""); for (i = 1; i <= 10; i++) { html2canvas(


' 。' + i),{
onrendered: function (canvas){
var img,data;
data = canvas.toDataURL( image / png);
console .log(data);
img = hWin。 document .createElement(' IMG');
img.src = data;
hWin。 document .body.appendChild(img);
}
});
}
}
);
('.' + i), { onrendered: function (canvas) { var img, data; data = canvas.toDataURL("image/png"); console.log(data); img = hWin.document.createElement('IMG'); img.src = data; hWin.document.body.appendChild(img); } }); } } );



问候,


Regards,


这篇关于在ASP.Net 4.0中为图像生成多个网格视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆