Trying to understand why my page doesn't work as expected. I was expecting the SignIn method on the controller to be called when clicking submit button, however, StartGame is still be called instead. The page originates through this URL: http://{domain}/Play/StartGame
Markup:
@{ ViewBag.Title = "Start Game"; } <h2>StartGame</h2> @using (Html.BeginForm()) { @Html.TextBox("gamerId"); <input type="submit" value="SignIn" class="btn btn-default" /> }
Controller:
public class PlayController : Controller { public ActionResult Index() { return View(); } public ActionResult StartGame() { return View(); } public ActionResult SignIn(string gamerId) { return View(); } }
What am I missing here?