2
我是一个MVC3剃须刀的新手。任何人都可以请帮助我为什么我得到这个错误运行。MVC3 - 剃刀:传递查询字符串时出错
错误: Object reference not set to an instance of an object.
它打破上ActionLink的。
HTML代码:
@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" })
}
控制器
[HttpPost]
public ActionResult Index(string name)
{
return View();
}
非常感谢