I'm a new bie with MVC3 razor. Can anyone please help me why I am getting this error on run.
Error:
Object reference not set to an instance of an object.
it breaks on ActionLink.
HTML Code:
@model Solution.User
@using (Html.BeginForm())
{
@Html.TextBoxFor(model => model.Name, new {@id = "name-ref", @class = "text size-40"})
@Html.ActionLink("Go Ahead", "Index", "Home", new {name = Model.name, @class = "button" })
}
Controller
[HttpPost]
public ActionResult Index(string name)
{
return View();
}
Many Thanks