0
<input type="text" data-bind="value: Price" id="Price" class="form title radius width-7"/>
我如何可以轉換使用@ Html.EditorFor(剃刀)?
感謝
<input type="text" data-bind="value: Price" id="Price" class="form title radius width-7"/>
我如何可以轉換使用@ Html.EditorFor(剃刀)?
感謝
添加適當的驗證屬性模型屬性,然後寫
@Html.EditorFor(m => m.price, new { @class = form title radius width-7" })
你說得對有關驗證屬性,但我需要補充的是也:數據綁定=「值:價格」 ... Knockoutjs! – Paul
然後將',data_bind =「...」'添加到第二個參數中。 '_'將被轉換爲'-'。 – SLaks