mvc3里使用ViewBag,到底怎么用?
this.ViewBag.ABC= "123123";
@Html.TextBox("Name", this.ViewBag.ABC)
为什么这里一直提示错误呀??
如何用ViewBag往@Html.TextBox赋值呢???
------解决方案--------------------@Html.TextBox("Name",ViewBag.ABC as object)
这样试一下
------解决方案--------------------@Html.TextBox("Name",ViewBag.ABC as string)