MVC use action attributes to map the same view for http get or post:
public ActionResult Index()
{
return View();
}
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Index(int id)
{
MyViewModel vm = new MyViewModel(id);
return View();
}
Question is: in javascript, how can I know if the view is for http get command or http post command?