-1
我正在使用此代碼,工作正常。HTML助手類
@Html.TextBox("myname", "somevalue", new { @class = "css-class", @onclick = "alert('demo');" id="mynewID"})
但對於這另一個重載:
HTMLHelper.Textbox(string name, object value, IDictionary<string,object> htmlattribute)
我使用像:
@Html.TextBox("myname", "", new Dictionary<string, object> { { "id", "f","class","ds" } })
,但得到的編譯錯誤......請幫助