【发布时间】:2016-05-16 03:06:52
【问题描述】:
我需要使用 HttpGet 将“字符串”值从 View 传递到 Controller !!
我执行以下操作,但它传递 null:
View.cshtml
@Html.ActionLink("Profile", "Index", "UserInfo", new { name = User.Identity.Name }, new { hidefocus = "hidefocus" })
UserInfoController.cs
[HttpGet]
public ActionResult Index(string user)
{
...
}
- User.Identity.Name 是我的字符串。
【问题讨论】:
标签: c# asp.net-mvc razor