I have a JavaScript function bound to an ASP button's click event which uses the HTML5 toDataURL function to grab the canvas:
function getimg ()
{
try
{
var img = canvas.toDataURL('image/jpeg', 0.9).split(',')[1];
}
catch(e)
{
var img = canvas.toDataURL().split(',')[1];
}
}
What's the best way to take the resulting img and pass it to a code-behind method? I found this post among others and experimented successfully with using a hidden field, but I'm hoping there's a more direct (less indirect?) way.