Click here to Skip to main content
15,912,205 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Is is possibe to get the images of the tag selected by jquery or c#.

example: Suppose I have a table tblMyTable , and I want to get image of header.

something like this $("#tblMyTable >tbody>tr:eq(0)").saveImage(path);
Posted
Comments
So, what is the issue with this code?
footballpardeep 2-Jan-14 14:06pm    
?

1 solution

As is, JavaScript can not access the the OS's storage (disk), so you can not save anything there.
You may consider this:
1. Render the part you need into a hidden canvas element (need html 5 and browser with canvas support) - see here how https://developer.mozilla.org/en-US/docs/HTML/Canvas/Drawing_DOM_objects_into_a_canvas[^]
2. Send the canvas element back to the server side and save it's content there.
 
Share this answer
 
Comments
footballpardeep 2-Jan-14 14:05pm    
i required solution without html5, as in clients may have old browsers.
Kornfeld Eliyahu Peter 2-Jan-14 14:11pm    
In that case you only option is to do it all on the server...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900