このビューからキャンバスのデータを取得する方法はありますか...
@{
ViewBag.Title = "Index";
}
<script src="../../Scripts/digisig.js" type="text/javascript"></script>
<div id="container">
@using (Html.BeginForm("Index"))
{
<canvas id="digisigBox" width="400" height="200">
</canvas>
<input id="submit" type="submit" value="Submit" />
}
</div>
...このコントローラーに?
public class HomeController : Controller
{
public ActionResult Index()
{
return View();
}
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Index(FormCollection formCollection)
{
return View();
}
}
通常、私は FormCollection.AllKeys を使用してデータを取得しますが、キャンバスをあまり扱ったことがなく、キャンバスのデータを MVC のコントローラーに渡す際に何も見つからないようです。