邮政数组中ASP.NET MVC 2使用的名称= QUOT; ARRAY_NAME [] QUOT;表单元素 [英] Post array in ASP.NET MVC 2 using name="array_name[]" for form elements

查看:263
本文介绍了邮政数组中ASP.NET MVC 2使用的名称= QUOT; ARRAY_NAME [] QUOT;表单元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

美好的一天!

在PHP是可能的name属性分配给用方括号输入元素,像这样: NAME =MY_VALUE []和PHP自动将它转换为数组服务器端。

In PHP it is possible to assign name attribute to input elements with square brackets, like this: name="my_value[]" and PHP automagically converts this to array on server side.

这是可能的ASP.NET MVC?如果不是有任何替代来处理ASP.NET MVC一堆复选框?

Is this possible in ASP.NET MVC? If not is there any alternative to process a bunch of checkboxes in ASP.NET MVC?

在此先感谢!

推荐答案

是的,这是可能的。你可以看看在以下博客帖子有关会议由默认的模型绑定使用。

Yes, it is possible. You might take a look at the following blog post about the convention used by the default model binder.

这篇关于邮政数组中ASP.NET MVC 2使用的名称= QUOT; ARRAY_NAME [] QUOT;表单元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆