fork download
  1. namespace ITrainMVC.Controllers
  2. {
  3. public class HomeController : Controller
  4. {
  5. public int Counter { get; set; }
  6.  
  7. public ActionResult Index()
  8. {
  9. return View();
  10. }
  11.  
  12. public ActionResult Details()
  13. {
  14. Counter++;
  15. ViewData["Counter"] = Counter;
  16. return View();
  17. }
  18. }
  19. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cs(3,32): error CS0246: The type or namespace name `Controller' could not be found. Are you missing an assembly reference?
prog.cs(7,10): error CS0246: The type or namespace name `ActionResult' could not be found. Are you missing an assembly reference?
prog.cs(12,10): error CS0246: The type or namespace name `ActionResult' could not be found. Are you missing an assembly reference?
Compilation failed: 3 error(s), 0 warnings
stdout
Standard output is empty