I am creating image in javascript and assigning that to a img element in javascript. How to pass that image to controller on ActionButton click in MVC3?
Javascript
var picture = jqplotToImg($('#ChartContent')); //method to change chart as picture, no needed here
var img = document.getElementById("img1");
img.src = picture;
View
@using (Html.BeginForm())
{
<img id="img1" name="img1" />
@Html.ActionButton("Export","ExportData","Report")
}
Controller
public void ExportReport(FormCollection fc)
{
}