I am trying to get username value from my view in my controller but i am getting a null:
Here is my View:
<form action="Home/Save" method=post >
Name: @Html.TextBox("Name") `
Here is my modified controller:
public class HomeController : Controller
{
public ActionResult Index()
{
ViewBag.Message = "Modify this template to jump-start your ASP.NET MVC application.";
return View();
}
[HttpPost]
public ActionResult Save()
{
ViewBag.Message = "Modify this template to jump-start your ASP.NET MVC application.";
return View();
}
I would like to change this code so i can capture the textbox value in my Save action.
Please let me know if i am missing something. Thanks