Create a MVC 4 web application and in home page (Index.cshtml) add Under this line Under <h3>We suggest the following</h3> Add this line <canvas id="HelloCanvas" style="float: left" > </canvas> Under this declaration @{ ViewBag.Title = "Home Page"; } Now add this script <script> window.onload = function () { var LineContext = $('#HelloCanvas')[0].getContext('2d'); LineContext.font = "20pt Calibri"; LineContext.fillStyle = "#024F8C"; LineContext.textAlign = "left"; LineContext.textBaseline = "middle"; LineContext.fillText("Hello world", 0, 10); LineContext.save(); } </script> Run this application and you will see "Hello world" Text. Now refresh this page from address bar and you will get exception. I spent whole day but no success. Any help will be very much appreciated.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)