Reputation: 13906
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";
}
While Attempting to create Controller, with the dialog
I get unsupported context type. What Am I missing, please ?
Upvotes: 0
Views: 1426
Reputation: 7385
Upvotes: 1