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.
我想将文本框的值设置为ViewBag项目。为什么下面的代码不起作用?
ViewBag
@Html.TextBox("UName", @ViewBag.UName)
@Html.TextBox("UName", (string)ViewBag.UName)