ASP.NET MVC3 - 带有 @Html.EditorFor 的 textarea - ASP.NET MVC3 - textarea with @Html.EditorFor

问题:

I have ASP.NET MVC3 app and I have also form for add news.我有 ASP.NET MVC3 应用程序,我也有用于添加新闻的表单。 When VS2010 created default view I have only text inputs for string data, but I want to have textarea for news text.当 VS2010 创建默认视图时,我只有字符串数据的文本输入,但我想要新闻文本的 textarea。 How I can do it with Razor syntax.我如何使用 Razor 语法做到这一点。

Text input look like this:文本输入如下所示:

@Html.EditorFor(model => model.Text)

解决方案:

参考一: https://en.stackoom.com/question/Kfjn
参考二: https://stackoom.com/question/Kfjn
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章