Using mvc-4 basic template I am creating a view with button a HTML button. Which upon being clicked will display. How many times this button has been clicked.
Created Model
ButtonTest.cs
namespace testmvc4basic.Models
{
public class ButtonTest
{
public int clickCount { get; set; }
}
}
Created View
Strongly typed View
@model testmvc4basic.Models.ButtonTest
@{
ViewBag.Title = "ButtonTest";
Layout = "~/Views/Shared/_Layout.cshtml";
}
ButtonTest
While Attempting to create Controller, with the dialog

I get unsupported context type. What Am I missing, please ?
1 Answer