Html.RadioButtonListASP.NET MVC Futures中有一个扩展方法.有没有人找到强类型版本的代码RadioButtonListFor<T>.它在视图中看起来像这样:
<%= Html.RadioButtonListFor(model=>model.Item,Model.ItemList) %>
Run Code Online (Sandbox Code Playgroud) 有没有办法为使用html帮助器生成的字段生成客户端ID?
我有几个组件,有时在另一种形式,我不想将javascript事件附加到他们.
所以,对于样品,我希望:
@Html.TextBoxFor(model => model.client.email)
<script>
$('#@getmyusercontrolid(model=>model.client.email)').val("put your mail here");
</script>
Run Code Online (Sandbox Code Playgroud)