I am using d3js library to draw charts. Here is I'm calling the action like this :
d3.json("CANCEL_REASON/Statistics2", function (data) {
....
My controller is like this :
public class CANCEL_REASONController : Controller
{
private Entities3 db = new Entities3();
public ActionResult Statistics()
{
return View();
}
public ActionResult Statistics2()
{
///...
return Json(data, JsonRequestBehavior.AllowGet);
}
When I debug the JavaScript, I realize that it's trying to call :
http://localhost:12345/CANCEL_REASON/CANCEL_REASON/Statistics2
When I change js to this :
d3.json("/Statistics2", function (data) {
....
It's trying to call this :
How should I modify my code so that it will call this :
Thanks.
/CANCEL_REASON/Statistics2