将可观察数组与模型一起传输到控制器 [英] Transferring observable array to controller along with model
问题描述
我想将可观察数组与模型一起传输到控制器。我做了我的冲浪,发现自定义模型绑定对我的情况有好处。但再次给出我可以使用controllerContext.HttpContext.Form.Get(Day);其中Day为Day< input id =Dayname =Dayvalue =type =text/>
i使用了select和select的元素存储为可观察数组....如果我不能使用数组,我可以使用选择名称或id如上面的情况...我该怎么做... coz select有很多选项...
和新的自定义模型绑定所以我很困惑哪些代码我放在哪里...我在哪里把
自定义绑定代码与IModelBinder interface
I want to transfer observable array along with model to controller. I did my surfing and found custom model binding is good for my situation.But again its given i can use controllerContext.HttpContext.Form.Get("Day"); where as Day is Day <input id="Day" name="Day" value="" type="text" />
i have used select and element of select is stored as observable array.... if i cant use array, i can use select name or id as above situation... how do i do it... coz select has many option...
and i m new to custom model binding so i m confusion which code i ve to put where...where do i put
custom binding code with IModelBinder interface
推荐答案
这篇关于将可观察数组与模型一起传输到控制器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!