@Html.TextBoxFor(o => o.TradeOrder.Symbol,new {data-message="required"})
但是,我收到以下错误:
Invalid anonymous type member declarator. Anonymous type members must be declared with a member assignment,simple name or member access.
@Html.TextBoxFor(o => o.TradeOrder.Symbol,new {data_message="required"})
TextBoxFor帮助器将知道该怎么做,并在生成标记时替换它。