HTML辅助参数,我看到很多代码是这样的:在C#剃刀(ASP.NET MVC)
@Html.LabelFor(x => x.username)
@Html.TextBoxFor(x => x.password)
这些仅仅是例子。任何人都可以请向我解释那x => x.username
部分是什么意思?我仍然在我的asp.net c#mvc应用程序中使用这样的html标签<input type="text">
,因为我没有得到@Html.TextBox
样式的挂起。
还有new
参数是这样的:
@Html.TextBoxFor(x => x.username, new {placeholder = @Html.DisplayNameFor(x => x.username})
我不明白这一切意味着什么。任何人都可以解释一下吗?
在此先感谢。