Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法在 Javascript 中为 ASP.NET MVC 控件生成客户端 ID?
@Html.TextBoxFor(m => m.Name)
像这样:
@Html.IdFor(m => m.Name)
我相信它们是以用于绑定它们的属性命名的,在您的示例中,除非您在重复部分中,否则文本框的 ID 将为“名称”。