【发布时间】:2014-07-09 20:53:15
【问题描述】:
我的 Controller 类中有更新的字符串。我想在我的视图中将我的 TextArea 设置为这个字符串。我的控制器的 ActionResult 如下所示:
[HttpPost][STAThread]
public ActionResult Index(DropDownModel model)
{
System.Diagnostics.Debug.WriteLine(DataJoin.Connector.data);
return View();
}
data 是我想在我的文本区域中设置的字符串。
我的观点是这样的:
@{
ViewBag.Title = "Home Page";
}
<h2>@ViewBag.Message</h2>
<div>
@Html.TextArea("textarea","Waiting for user input.....",new {style = "width: 1188px; height:280px;"})
如何设置此 TextArea 中数据的值。
【问题讨论】:
标签: c# asp.net-mvc razor textarea