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
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章