1) 同时编辑与该行一个观点:ASP.NET剃刀Html.TextArea
@Html.TextArea(name: "Message", rows: 10, columns: 40)
我得到在编译时这个错误:
即使有一个签名ERR: "The best overload for 'TextArea' does not have a parameter of type 'rows'"
以行和列作为参数。
2) 所以我尝试用签名: @ Html.TextArea(字符串名称,对象htmlAttributes)
调用该函数如下
@Html.TextArea(name: "Message", new { rows=10, columns=40 }
但我发现了另一个错误:
ERR: "Named Argument Specifications must appear after all fixed arguments have been specified"
任何人都知道为什么以及如何解决它们?
预先感谢您!
完美的,这是第二个问题的问题。虽然第一个需要指定签名的所有标签:Html.TextArea(name:“Message”,rows:10,columns:40,value:“”,htmlAttributes:new {}) – Zeta 2013-03-08 08:33:32
看起来像“列“不工作,但”cols“是。所以如果你有像我这样的问题,试试这个。 – Tom 2014-06-24 07:18:02